Skip to content

Tag: google-bigquery

Bigquery SQL MAX() text value

Thanks for taking the time to look at this. How to get the MAX of a text value in column A. I would like to and another where clause to show only one of the “FY20-Q4M#” (MAX value only) Current Table YY-QQ_STATUS Program FY20-Q2_ACTUALS XYZ FY20-Q3_ACTUALS XYZ FY20-Q3_BUDGET XYZ FY20-Q4M0 XYZ FY20…

“Flattening” complex sequences of related rows in SQL

I have a table with events describing user navigation through flows, with this general shape (disregard the timestamps, I smashed some keys): After the option_a event, users can go back and choose another option: Users can also go through a flow multiple times: I want to produce a table where each row represe…

How to give names to output tables?

I need to do a JOIN using two ouput-tables (these tables result from previous operations using other tables). I want to give them specific names to reference them. I’ve try ALIAS, AS, INTO, but nothing works. I am new in SQL and I’d really like some help here. My code is the following I’d li…