© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
S
Supabase
•
3y ago
Bat Lamjav
Joining 3 tables
Hi all
.
I
'm trying to make a query to a bookings table which fk references a post table
, which fk references a user table
.
I want to select from the bookings table the post row as well as the info about the author of the post
. How can I do this in a single query
?
This is what I have so far
:
const query
= supabase
.from
(
"bookings
"
)
.select
(
id,
post_details: driver_posts (*)
rider_id
id,
post_details: driver_posts (*)
rider_id
,
)
.eq
(
"rider
_id
"
, user
?
.id
)
.eq
(
"status
"
,
"REQUESTED
"
)
This selects the referenced post but I also want to select from the profiles table joining on the post
_details
.user
_id field
(not rider
_id
)
.
Supabase
Join
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
RPC that return result of joining to tables
S
Supabase / help-and-questions
4y ago
Tables In Tables?
S
Supabase / help-and-questions
4y ago
Lost tables
S
Supabase / help-and-questions
4mo ago
Tables wiped
S
Supabase / help-and-questions
5mo ago