I'm trying to retrieve the count of multiple values but can get only partial count.
My code
SELECT COUNT(*) as count, `dateadded` FROM s2 WHERE 'LEVEL` IN (1,2,3) and
client = 'myuser' GROUP BY `LEVEL`,`dateadded` ORDER BY `dateadded` DESC
LIMIT 1");
My table
client dateadded level
myuser 2019-01-21 3
myuser 2019-01-21 2
myuser 2019-01-21 5
myuser 2019-02-16 3
myuser 2019-02-16 2
myuser 2019-02-16 8
myuser 2019-02-16 2
My return value should be: 3 -> latest date (2019-02-19) and count of 1,2 and 3.
I want to count how many 1, 2 and 3 from the latest date only.
Thank you very much!!
Nathalie