Counting Answers By day mySQL -
i have table called mytable.
with following fields
id date_done successful ('yes', 'no', null) total_cost
i know can per day count using
select date_done, count(*) mytable group date_done;
what want count of number of 'yes" andsers in successful day.
what sql like?
select date_done, sum(successful = 'yes') mytable group date_done
Comments
Post a Comment