Skip to content
Advertisement

Simplest way to unnest a BQ table

I can directly unnest an array from a literal in BQ as follows: select * from unnest([1,2,3]) # [{“f0_”: “1”},{“f0_”: “2”},{“f0_”: “3”}] …

Return all data where a value does not exist

I want to know if a job does not have an ‘LI’ CompCode. SELECT bSLHD.Job, SLCT.SL, APVM.Vendor, APVM.Name, SLCT.CompCode, SLCT.ExpDate FROM bSLHD INNER JOIN SLCT ON bSLHD.SL = SLCT.SL …

Advertisement