BigQuery stops a whole query when one row hits an error, like dividing by zero or casting 'n/a' to a number. Its SAFE functions return NULL instead:
SAFE_DIVIDE(a, b) is a / b, or NULL when b is 0.
SAFE_CAST('n/a' AS INT64) is NULL instead of an error.
For if-then logic, IF(condition, then, else) is the short form of CASE WHEN. IFNULL(x, fallback) replaces NULL, like a two-value COALESCE, and NULLIF(x, 0) turns a value into NULL.
Division in BigQuery always returns a FLOAT64: 7 / 2 is 3.5. For whole-number division, use DIV(7, 2), which is 3.