[ale] any SQL gurus?

Danny Cox danscox at mindspring.com
Wed Jan 21 17:26:56 EST 2004


On Wed, 2004-01-21 at 11:04, Jason Etheridge wrote:
> > select t.name from t TITLE, c COPY where c.owner = "whoever" and
> > 	c.title_key = f.title_key;
> 
> So it's not a list I need, but a count.  Hrmm.
> 

	I think GROUP BY would come in handy.  Lemme see, it's been a few years
here, so pardon the rustiness of the following:

	select count(*), t.name
          from TITLE t, COPY c
         where c.title_key = t.title_key
      group by t.name

and this is from the INGRES dialect, so "count(*)" may not be proper in
ANSI SQL.

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny



More information about the Ale mailing list