views:

10

answers:

1

Hi;

I want the count of a total groups.

I have following query. I want how many groups this query returned based on web_id. Lets suppose if it grouped under 4 groups. I need count 4.

select * from web_details where redirected = false group by web_id

I hope my question is understood.

A: 

I just figured it out how can I do this.

The ideas was so simple but I was not clicking it.

select count(*) from ( select * from web_details where redirected = false group by web_id ) as temp;enter code here

Tahir Akram