Re: Simple (hopefully) query question

From: shakespeare <whatsin_at_xs4all.nl>
Date: Wed, 6 Feb 2008 21:25:05 +0100
Message-ID: <47aa179c$0$85779$e4fe514c@news.xs4all.nl>

"TonyV" <kingskippus_at_gmail.com> schreef in bericht news:a162f6df-ada4-43ec-a2e9-37c939a80747_at_i7g2000prf.googlegroups.com...
> Hey all, I'm having a problem with what should be a simple query. I
> don't know if my brain is fried today or what, but hopefully the
> following simple example will explain what I'm trying to do:
>
> -- Does NOT work
> select col_name, col_count
> from (
> select column1 "col_name", count(column1) "col_count"
> from table_name
> group by column1
> )
> where col_count > 1;
>
> When I try to run this, I get dinged with a 904 error, invalid
> identifier.
>
> My question is this: How can I select the name and count of something
> where the count is greater than one?

Take away the quotes (""). Your column aliases are in lowercase now....

Shakespeare Received on Wed Feb 06 2008 - 14:25:05 CST

Original text of this message