add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
5 rows affected
6 rows affected
ERROR:  column "users.user_id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 2:     users.*,
            ^

user_id user_name products
1 user1 null
2 user2 [{"user_id":2,"id":1,"name":"prod1","att1":"att1"},
 {"user_id":2,"id":2,"name":"prod2","att1":"att1"},
 {"user_id":2,"id":3,"name":"prod3","att1":"att1"},
 {"user_id":2,"id":4,"name":"prod4","att1":"att1"}]
3 user3 [{"user_id":3,"id":5,"name":"prod5","att1":"att1"},
 {"user_id":3,"id":6,"name":"prod6","att1":"att1"}]