Re: how this query can be done?

From: Henry <hxzhang_at_binary-solutions.net>
Date: Tue, 09 Apr 2002 15:55:12 GMT
Message-ID: <A9Es8.7833$Hw6.332982_at_news1.telusplanet.net>


i found the answer late last night. it should be a right join plus a nvl() function.
i was not asking for "group by"

"LR" <lrako_at_hotmail.com> wrote in message news:dcc2db96.0204090354.66ed4c00_at_posting.google.com...
> Have a look on your SQL course - Chapter "grouping functions" and "how
> to use GROUP BY clause".
>
> lrako
>
>
> > > > I have a table with different employees. It is known that employees
 may
> > > > fall into the following categories:
> > > >
> > > > { type0, type1, type2, type3, ...type 100, ....}
> > > >
> > > > 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!
> > > >
> > > >
> > >
> > >
Received on Tue Apr 09 2002 - 17:55:12 CEST

Original text of this message