| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Martijn Tonies | Date: | June 15 2004 7:20am |
| Subject: | Re: How to COUNT rows when they have a COUNT in them | ||
| View as plain text | |||
Just a note... > Thanks - this did not work for me as I am on 4.0.17 - presumably this works > on 4.1 (seems to need the SubQuery feature)? If so I will upgrade > immediately! This isn't a subquery -- this is a Derived Table. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com > >Following query does what you want: > > > >SELECT COUNT(*) from (SELECT COUNT(*) as c FROM pet GROUP BY owner HAVING > >c>1) as temp > > > >-Yayati
| Thread | ||
|---|---|---|
| • How to COUNT rows when they have a COUNT in them | Dave Torr | 15 Jun |
| • Re: How to COUNT rows when they have a COUNT in them | Yayati Kasralikar | 15 Jun |
| • Re: How to COUNT rows when they have a COUNT in them | Dave Torr | 15 Jun |
| • Re: How to COUNT rows when they have a COUNT in them | Michael Stassen | 15 Jun |
| • Re: How to COUNT rows when they have a COUNT in them | Martijn Tonies | 15 Jun |
| • Re: How to COUNT rows when they have a COUNT in them | Garth Webb | 15 Jun |
| • Re: How to COUNT rows when they have a COUNT in them | Michael Stassen | 15 Jun |
| • Re: How to COUNT rows when they have a COUNT in them | Dave Torr | 15 Jun |
| • Re: How to COUNT rows when they have a COUNT in them | Brian Mansell | 15 Jun |
