TED]>; "Paul DuBois"
<[EMAIL PROTECTED]>
Sent: 19 January 2002 21:18
Subject: Re: Column Alias Bug??
>
> > Somewhere there's a 'table' or list showing the sequence that the various clauses
>are evaluated/executed. Is
it
> > in the manual or in
> Somewhere there's a 'table' or list showing the sequence that the various clauses
>are evaluated/executed. Is it
> in the manual or in your book Paul? If it's online, it would be useful to know where
>so that a link can be added
> to answers to such questions...
>
> Anyone remember where?
> >Is this a bug? I can't find an answer to this question in FAQs or archives.
> >
> >CREATE TABLE aa ( a int);
> >INSERT INTO aa VALUES (1),(2),(3),(2),(4),(5),(1),(6),(3);
> >
> >the following :
> >mysql> select a,count(*) as z from aa where z>1 group by a;
> >
> >displays this error:
> >ERROR
At 15:30 -0600 1/18/02, Rick Emery wrote:
>Is this a bug? I can't find an answer to this question in FAQs or archives.
>
>CREATE TABLE aa ( a int);
>INSERT INTO aa VALUES (1),(2),(3),(2),(4),(5),(1),(6),(3);
>
>the following :
>mysql> select a,count(*) as z from aa where z>1 group by a;
>
>displa
> Is this a bug? I can't find an answer to this question in FAQs
> or archives.
>
> CREATE TABLE aa ( a int);
> INSERT INTO aa VALUES (1),(2),(3),(2),(4),(5),(1),(6),(3);
>
> the following :
> mysql> select a,count(*) as z from aa where z>1 group by a;
>
> displays this error:
> ERROR 1054: U
1 |
+--+--+
6 rows in set (0.40 sec)
-Original Message-
From: Nathan [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 18, 2002 3:34 PM
To: Rick Emery
Subject: Re: Column Alias Bug??
What does the count(*) do? If that's failing, maybe the alias doesn't get
created?
Hi,
Try :
SELECT a,COUNT(*) AS z FROM aa GROUP BY a HAVING z>1;
Regards,
Jocelyn
- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 18, 2002 10:30 PM
Subject: Column Alias Bug??
> Is this a bug? I
Is this a bug? I can't find an answer to this question in FAQs or archives.
CREATE TABLE aa ( a int);
INSERT INTO aa VALUES (1),(2),(3),(2),(4),(5),(1),(6),(3);
the following :
mysql> select a,count(*) as z from aa where z>1 group by a;
displays this error:
ERROR 1054: Unknown column 'z' in 'w