Re: Advanced(?) query question

From: Bob Badour <bbadour_at_golden.net>
Date: Thu, 18 Sep 2003 23:32:35 -0400
Message-ID: <d0wab.233$D%1.20831255_at_mantis.golden.net>


"Anders Steinlein" <dinhelt_at_online.noSPAM> wrote in message news:MPG.19d485d86d10bc3d9896df_at_news.online.no...
> In article <ZDuab.216$uO1.20255791_at_mantis.golden.net>, bbadour_at_golden.net
> says...
> > >
> > > In two tables, cities and countries, the first references the latter
> > > (foreign key). I want to retrieve the country ids (the column shared
by
> > > both tables) where the values in the password column in the countries
> > > table is null, but those country ids found should not have more than
10
> > > occurences in the cities table.
> > >
> > > Can this be done?
> >
> > Yes.
>
> Okaaay. Care to help me out?

Use a scalar correlated subquery and the count aggregate function. Alternatively, use both "group by" and "having" clauses. Received on Fri Sep 19 2003 - 05:32:35 CEST

Original text of this message