The first row is my results is all null, how do I remove that from my results?
This is my query:
SELECT COALESCE(UNIX_TIMESTAMP(Date(p.published_at)),0) as 'day',
COALESCE(SUM(case when p.status = 2 then p.value end),0) as 'total_accepted',
COALESCE(SUM(case when p.status = 1 then p.value end),0) as 'total_open',
COALESCE(SUM(case when p.status = 3 then p.value end),0) as 'total_declined',
COALESCE(SUM(case when p.status !=0 then p.value end),0) as 'total_published'
FROM posts as p
GROUP BY DATE(p.published_at);
Ive used coalesce to remove any null values from the rest of my result, so the first row is technically all 0's now. but I'm graphing this data, and my lines start all they in 1970... and computers didn't exist back then =p