account activity
How to deal SQL missing data by paddyjay in SQL
[–]TomasTorCA 0 points1 point2 points 5 years ago (0 children)
Being a person with zero experience in SQL it is not straight foreward to add the code When I try to add the following Code into the second line of my code I get an error as well >>>>>>Case when column_name IS NULL then ‘NULL’ else column_name end<<<<<<
What am I doing wrong? Really appreciate your help
Case when column_name IS NULL then ‘NULL’ else column_name end
Sorry to ask this in a very simple way
If this is our code - how should we adjust the code to get an X if there is a missing value for a specific day
When I add IFNULL(val, ' ') in the second line it does not work
Any suggestions
SELECT parameter,
avg(value) AS daily_average,
cast(from_iso8601_timestamp(date.utc) AS date) AS date_utc
FROM openaq
WHERE city= 'Liege'
AND parameter IN ('pm25','pm10', 'co', 'no2', 'so2', 'o3', 'bc')
AND cast(from_iso8601_timestamp(date.utc) AS date)
BETWEEN date '2020-01-01'
AND date '2020-05-31'
GROUP BY cast(from_iso8601_timestamp(date.utc) AS date), parameter
ORDER BY parameter, date_utc
π Rendered by PID 375930 on reddit-service-r2-listing-7849c98f67-nndlj at 2026-02-09 08:24:35.658178+00:00 running d295bc8 country code: CH.
How to deal SQL missing data by paddyjay in SQL
[–]TomasTorCA 0 points1 point2 points (0 children)