Skip to content
Advertisement

Big Query Deduplication of rows with nested data

If having a table looking like this:

And I only want to return one row, the last updated, how can I do this considering topics includes an array/nested field?

Do I need to unnest and nest again or is there some nifty trick?

Advertisement

Answer

You can use aggregation:

The above is BigQuery-specific. A more traditional method is to use row_number():

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement