Data Engineering
NULL Sorting in BigQuery
→ 日本語版を読むWhen using an ORDER BY clause in BigQuery, the default NULL ordering differs between ASC and DESC. With ASC, NULLs come first, and with DESC, NULLs come last.
- NULLS FIRST is applied by default if the sort order is ascending.
- NULLS LAST is applied by default if the sort order is descending.
If the default NULL ordering is not suitable, you can control the sort order of NULLs by using NULLS FIRST or NULLS LAST in the ORDER BY clause.
Reference
https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#order_by_clause