SupabaseS
Supabase4y ago
Amr

Join table multiple times ?

I have this table stops
- id - name
|- 1 - Cairo
|- 2 - Giza

and another table trips
- id - departure - arrival
|- 1 -     1     -   2

the departure column is a foreign key to stops.id and arrival to the same stops.id key.

Now I can't select from trips while using left join because of this error:

Failed to run sql query: table name "stops" specified more than once

Of course I tried this first in SQL editor in supabase, but I'll use the js client for the project.
Was this page helpful?