How to write out query with supabase sql

How should I express such a query with the supabase js client?
SELECT
    f1.form_structure AS form_structure_1,
    f2.form_structure AS form_structure_2,
    c.*
FROM
    competitions c
LEFT JOIN
    forms f1 ON c.form_id = f1.id
LEFT JOIN
    forms f2 ON c.secondary_form_id = f2.id;

both form_id and secondary_form_id foreign key to the forms table.

ive gotten to
    const {data, error} = await supabase
      .from('competitions')
      .select('*, 

and now im stuck as to what to put after the comma
Was this page helpful?