© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
8 replies
Hugo

How to order a joined query?

    const conversationWithMessagesQuery = supabase
        .from('conversations')
        .select('*, messages (*)')
        .eq('id', conversation_id)
        .limit(1)
        .single();
    const conversationWithMessagesQuery = supabase
        .from('conversations')
        .select('*, messages (*)')
        .eq('id', conversation_id)
        .limit(1)
        .single();

I want the messages to be ordered by
created_at
created_at
DESC, how do I do this for a join?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to count a joined foreign table?
SupabaseSSupabase / help-and-questions
4y ago
How to order and limit results within joined relationships with PostgREST client?
SupabaseSSupabase / help-and-questions
5mo ago
Supabase: .order() not working on joined table column
SupabaseSSupabase / help-and-questions
6mo ago
How to filter on joined table
SupabaseSSupabase / help-and-questions
4y ago