79802225

Date: 2025-10-27 20:33:11
Score: 1.5
Natty:
Report link

I found a solution before this got approved. This is what I ended up with:

SELECT
    ...,
    (SELECT pi.value -> 'id' FROM jsonb_each(data -> 'participants') AS pi WHERE pi.value -> 'tags' @> '["booked"]') custom_column_name
FROM
    ...
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: mrivera