Subject | Re: [firebird-support] Fb/1.5 loop(?) |
---|---|
Author | Aage Johansen |
Post date | 2004-06-17T20:55:15Z |
Gary Benade wrote:
select LAND || ' ' || count(*) || ' '
from TITLER
group by LAND
order by count(*) desc
But the result is about as ugly as my first attempt ...
My immediate reaction was that making the result into one single
(concatenated) field would "fool" the count(*) - I was wrong :-|
Thanks,
Aage J.
>>I don't think your suggestion will work. What will "count(*)" count, andIn fact, your suggestion works.
>>what is there to GROUP BY?
>
>
> Count(*) will count the unique unstances of LAND, and it will grouop by
> land.
select LAND || ' ' || count(*) || ' '
from TITLER
group by LAND
order by count(*) desc
But the result is about as ugly as my first attempt ...
My immediate reaction was that making the result into one single
(concatenated) field would "fool" the count(*) - I was wrong :-|
Thanks,
Aage J.