Re: Simple question for SQL Student

Поиск
Список
Период
Сортировка
От snpe
Тема Re: Simple question for SQL Student
Дата
Msg-id 01052317335806.01172@spnew
обсуждение исходный текст
Ответ на Simple question for SQL Student  ("Johnny_5555" <dsiebert@u.washington.edu>)
Список pgsql-general
On Monday 21 May 2001 01:27, Johnny_5555 wrote:
> I want to use an aggregate function in the WHERE clause and SQL Server 7
> won't let me?  Specifically, I need to find a customer ID where the budget
> is equal to MAX(budget).  Is my logic wrong?  How can I display the the
> customer ID with the biggest budget?  Any help is really appreciated.  TIA
>
>
>
select customerId,max(budget)
from <table_name>
group by customerId
having mx(budget)=xxx

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Estimating costs (was Functional Indices)
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Estimating costs (was Functional Indices)