Skip to content
Advertisement

Filling a column with similar values in SQL

I’m beginner on StandardSQL

My Table :

enter image description here

I need your help to get the transactionId to be duplicated on each row instead of the Blank.

enter image description here

My Query :

Advertisement

Answer

You already have transactionId on each row. Your query generates rows where each row has transactionId and some array. The BigQuery GUI just formats array elements to separate rows. You probably want to join products directly in from clause, then you obtain one row per product, with transactionId from hit.

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