Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how this can be done?
select type ||':', count(*) || ' people'
from <table>
group by type;
Hope this helps.
Henry wrote:
> however, there could be no employ for a certain type at all.
>
> My boss wants an query that list all types with its number of employees.
> and the sql result will be like:
>
> type0 : 5 people
> type1 : 1 people
> type2 : 0 people
> ...
>
> how can i accomplish this?
> thanx a lot!
-- Regards, PraveenReceived on Tue Apr 09 2002 - 02:14:30 CDT