WITH operator

ΠŸΠΎΠ·Π²ΠΎΠ»ΡΠ΅Ρ‚ Π±ΠΈΡ‚ΡŒ слоТныС запросы Π½Π° малСнькиС поэтапныС

WITH
    "SubQuery" as (SELECT * FROM "log"),
    "SubQuery2" as (SELECT * FROM "SubQuery" GROUP BY "id")
SELECT * 
FROM "SubQuery2" 
    LEFT JOIN "SubQuery" ON "SubQuery2"."id" = "SubQuery"."id"

Last updated