I have a table of points.
There are three columns of bits (
To pick up,
Destination), a varchar
Label, a foreign key
ParentIDand the primary key
I want one
String_Agg (Label, & # 39;) when
PickUp = 1, another when
SetDown = 1and a third when
Destination = 1, Grouped by
What I have now has three separate subqueries with a
O PickUp = 1 pattern for each column of bits.
Is there a way to do that without having three separate subqueries? A way to group all three channels in a single pass on the table?