This is the expected result when counting the number of rows matching your condition.
SELECT date,count(id) as count FROM scores where `name` = 'vijay' group by `date`;
It selects only one record, so the result of count is 1.
If you want to assume that all the rows used do not limit the data, use Where Clause for example: -
SELECT date,count(id) as count FROM scores group by `date`;
How wise, the next query will return 3 as the score.
SELECT date,count(id) as count FROM scores where id in (1,2,3) group by `date`;
source share