Hi,
Is it possible to write this query with Sequel?
SELECT DISTINCT ON (x.e->>'email')
x.e->>'email' as email,
x.e->>'name' as name
FROM messages sr
CROSS JOIN LATERAL jsonb_array_elements(sr.receiver) x (e)
ORDER BY x.e->>'email', id desc
Or I use *with_sql?*
Thanks!
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/3315e21f-148b-4c33-8e81-27f3b091bb03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.