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 themDave Torr15 Jun
  • Re: How to COUNT rows when they have a COUNT in themYayati Kasralikar15 Jun
Re: How to COUNT rows when they have a COUNT in themDave Torr15 Jun
  • Re: How to COUNT rows when they have a COUNT in themMichael Stassen15 Jun
  • Re: How to COUNT rows when they have a COUNT in themMartijn Tonies15 Jun
  • Re: How to COUNT rows when they have a COUNT in themGarth Webb15 Jun
    • Re: How to COUNT rows when they have a COUNT in themMichael Stassen15 Jun
Re: How to COUNT rows when they have a COUNT in themDave Torr15 Jun
  • Re: How to COUNT rows when they have a COUNT in themBrian Mansell15 Jun