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

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -