This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi, I'm relatively new to bigquery and not that good in sql.
I've a big query with select as struct as subquery. Below i'm sharing a fragment of the query :
(SELECT AS STRUCT
CASE
WHEN Keywords IS NULL THEN 0
ELSE 0
END AS Keywords_1TO3,
totalImpressions AS totalImpressions_1TO3,
totalClicks AS totalClicks_1TO3,
AVRCTR AS AVRCTR_1TO3,
AVRRanking AS AVRRanking_1TO3
FROM POSITION_RANGE_DATA
WHERE POSITION_RANGE_DATA.website = Month.website
AND positionRange = '1>3'),
I tried too ifnull(Keywords, 0).
I only tried with one column, but in fact I would like to verify all column and put 0 if it's null value.
There is no errors remaining but in the result the column is still greyed out for empty.
Thanks for helping me, guiding me to something working 👋
Subreddit
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/bigquery/co...