Problems with HAVING
От | Kaloyan Iliev Iliev |
---|---|
Тема | Problems with HAVING |
Дата | |
Msg-id | 41E5529B.9030609@faith.digsys.bg обсуждение исходный текст |
Ответы |
Re: Problems with HAVING
Re: Problems with HAVING |
Список | 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 по дате отправления: