tags:

views:

32

answers:

1

hello let's say mysql is something like this

select x,y 
from xx 
group by y

i want to know how many rows that select will get, i tried to use count but it will n't return all results since i'm using group by.

how to do that?

Thanks

+1  A: 

You can wrap your query like so:

SELECT COUNT(*) FROM
  (select x,y  
    from xx  
    group by y) sub;
dnagirl
Thanks a lot, worked like magic !!
From.ME.to.YOU