How to select any single full row from a group_by group in bigquery.
Given a table foo
with columns [a, b, c, d, e, f]
I would like to select any full row for each value of a
. What would be a reasonable syntax here?
Existing question addresses selecting only a single column, not a whole row.
PostgreSQL allows to do it using DISTINCT ON (a)
but this is not available in BQ.