sql - One to Many join returns single row in postgres -
i tried go through many pages not able find result problem. need solution below scenario, using left join needs enhancement.
for example:

one method conditional aggregation:
select pkid_from_table_1, max(case when u_data = 'unique0' u_value end) unique0, max(case when u_data = 'unique1' u_value end) unique1, max(case when u_data = 'unique2' u_value end) unique2, max(case when u_data = 'unique3' u_value end) unique3, max(case when u_data = 'unique4' u_value end) unique4 example group pkid_from_table_1; this ansi standard sql , work in databases.
Comments
Post a Comment