Query using complex SQL (Native SQL)
Native SQL — the SQL runs on the BigQuery side (server-side). Prefix with #DirectSQL to use this mode. Example uses GROUP BY and ORDER BY with the public dataset bigquery-public-data.usa_names.usa_1910_2013.
#DirectSQL
SELECT name, gender, SUM(number) AS total
FROM bigquery-public-data.usa_names.usa_1910_2013
GROUP BY name, gender
ORDER BY total DESC
LIMIT 10