From: | Kaloyan Iliev Iliev <news1(at)faith(dot)digsys(dot)bg> |
---|---|
To: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Problems with HAVING |
Date: | 2005-01-12 18:39:17 |
Message-ID: | 41E56ED5.8040005@faith.digsys.bg |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Thanks for the replay first.
Yes I use "having" like I have written. I can't use your query because
in subquery I must write again the whole WHERE clause.
But in the other mail in the tread there is the solution:)
Thanks again
Kaloyan
Sam Mason wrote:
>Kaloyan Iliev Iliev wrote:
>
>
>>select test.name
>>
>>
>>from test
>
>
>>where test.name = foo.name
>>having max(test.date)
>>
>>
>
>I don't think you use the "having" clause like you've done there. I
>think you want to be doing something more like:
>
> select test.name
> from test
> where test.name = foo.name
> and test.date in (select max(date) from test);
>
>But I may have misinterpreted you. . .
>
>Cheers,
> Sam
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Kaloyan Iliev Iliev | 2005-01-12 18:40:51 | Re: Problems with HAVING |
Previous Message | Kieran Ashley | 2005-01-12 18:28:44 | Re: Problems with Quotes |