Subject | Re: [firebird-support] Sum results of a subquery? |
---|---|
Author | Kjell Rilbe |
Post date | 2005-02-14T21:03:51Z |
Alan McDonald wrote:
nice to know what my options are.
the names up there were made up to make my question clear - they're not
the names I actually use.
Many thanks,
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
>>select sum("DuplicatesPerCategory") "Duplicates"Ok then I think I'll settle for the loop. :-) But thanks anyway - it's
>>from (
>> select count(*) - 1 "DuplicatesPerCategory"
>> from "TheTable"
>> group by "Category"
>> having count(*) > 1
>>)
>>
> create a view with your subselect, then select over it with the count(*)
nice to know what my options are.
> BTW - do you really need the mixed case object identifiers? what a painNope, don't need'em. Want'em! :-) I like readability. On the other hand,
the names up there were made up to make my question clear - they're not
the names I actually use.
Many thanks,
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64