Problems with HAVING - Mailing list pgsql-sql

From Kaloyan Iliev Iliev
Subject Problems with HAVING
Date
Msg-id 41E5529B.9030609@faith.digsys.bg
Whole thread Raw
Responses Re: Problems with HAVING
Re: Problems with HAVING
List pgsql-sql
Hello,<br /><br /> My problem is that I want to select the row with max(date) but also limited with where clauses.<br
/><br/> Select <br /> test.name<br /> from <br />  test<br /> where<br /> test.name = foo.name<br /> having
max(test.date)<br/><br /> This is a subquery and is part bigger query. How I can select the row with the max query.<br
/><pre><fontclass="result">ERROR:  argument of HAVING must be type boolean, not type date
 

</font></pre> <font class="result">This is the error I receive. <br /> As far as I know I can't use agregate functions
inwhere clause.<br /><br /> Thank you in advance.<br /><br /> Kaloyan Iliev<br /></font><br /><br /> 

pgsql-sql by date:

Previous
From: Andrew Hammond
Date:
Subject: Re: Implementing queue semantics (novice)
Next
From: Szűcs Gábor
Date:
Subject: failed to find conversion function from "unknown" to text