Subject Re: SELECT COUNT(sub_select.*) as COUNT, sub_select.user_name ...
Author esrefatak
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 09:55 AM 15/01/2004 +0000, you wrote:
> >Content of my "USER" table:
> >
> >user_name password name surname
> >_________ ______ __________ ________
> >
> >g aa aa
> >h bb bb
> >i cc cc
> >j dd dd
> >k ee ee
> >l ff ff
> >
>
>
> >Result of SQL must be :
> >
> >COUNT user_name password
> >_____ ______ __________
> >6 g aa
> >6 h bb
> >6 i cc
> >6 j dd
> >6 k ee
> >6 l ff
>
> SELECT
> (select count(ss.user_name) from USER ss) as "COUNT",
> u.user_name,
> u.password
> FROM USER u;
>
> /hb

it method is lower performance