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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -