© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•17mo ago•
5 replies
html_extraordinaire

Lateral joins

Hi, from what I understand, lateral joins aren't supported by the query builder yet. I'm wondering what options I have to get type safe results from a query like this:
select f.id, f.family_name familyName, f.image_uuid imageUuid, json_agg(fm.data) members from family f left join lateral (select row_to_json(fm) data from (select * from member m where m.family_id = f.id) fm) fm on true group by f.id
select f.id, f.family_name familyName, f.image_uuid imageUuid, json_agg(fm.data) members from family f left join lateral (select row_to_json(fm) data from (select * from member m where m.family_id = f.id) fm) fm on true group by f.id
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Lateral joins
Drizzle TeamDTDrizzle Team / help
2y ago
Lateral Left Joins in Drizzle Core Queries
Drizzle TeamDTDrizzle Team / help
3y ago
mysql 5.7.4 lateral issues
Drizzle TeamDTDrizzle Team / help
3y ago
aliased joins
Drizzle TeamDTDrizzle Team / help
3y ago