Calculate MODE in BigQuery Without a Built-in Function