Zum Hauptinhalt springen
Oopsy Oops von , vor 8 Jahren
recursive

Recurcive CTEs (Common Table Expressions) are a powerful construct within PostgreSQL, it defined in the WITH clause. CTEs allows to work with temporary set of data and transform it. In our case query collects all rags except hat from the girl, and combines it one set without duplicates :) „" is not equal operator „array_agg" conctatinates input values into array „dictinct" removes duplicates values I’ve made an example to play with CTEs sqlfiddle.com/#!17/f2ea4c/1


Exey Panteleev | CC BY 2.0