Back
I need help from you, this is my SQL query:
select count(SID) from Test where Date = '2012-12-10' group by SID
this is my result:
|2| |3| |4| |3|
and now I have to count the results from the first query!
Expected result: 4
To select count(*) from result query in MySql. you can easily understand, look at this example
select count(*)from( select count(SID) tot -- add alias from Test where Date = '2010-10-10' group by SID) src; -- add alias
select count(*)
from
(
select count(SID) tot -- add alias
from Test
where Date = '2010-10-10'
group by SID
) src; -- add alias
31k questions
32.8k answers
501 comments
693 users