JavaScript: Order the results

Examples

With `select()`

const \{ data, error \} = await supabase
  .from('cities')
  .select('name, country_id')
  .order('id', \{ ascending: false \})

With embedded resources

const \{ data, error \} = await supabase
  .from('countries')
  .select('name, cities(name)')
  .eq('name', 'United States')
  .order('name', \{foreignTable: 'cities'\})

Ordering multiple columns

const \{ data, error \} = await supabase
  .from('cities')
  .select('name', 'country_id')
  .order('country_id', \{ ascending: false \})
  .order('name', \{ ascending: false \})