get counts of null and not null dates in mysql -


i have table in mysql named cfixed table shown below

enter image description here

i need counts of null , not null dates shown below

enter image description here

i have wrote mysql query getting count of not null , null dates shown below

for getting not null dates counts date not showing 0 count

select date, count(*) counts cfixed fixed not null group date 

for getting null dates counts date not showing 0 count

select date, count(*) counts cfixed fixed null group date 

can please tell me how counts of null , not null within single query

count() automatically counts non-null values (if provide specific column).
null values can use conditional sum()

select date,         count(fixed) non_null_counts,        sum(fixed null) null_counts cfixed  group date 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -