correlated subquery
| От | Bruce Momjian |
|---|---|
| Тема | correlated subquery |
| Дата | |
| Msg-id | 199912292236.RAA13960@candle.pha.pa.us обсуждение |
| Ответы |
Re: [HACKERS] correlated subquery
Re: [HACKERS] correlated subquery |
| Список | pgsql-hackers |
Is this a good example of a required correlated subquery: SELECT f1.firstname, f1.lastname, f1.ageFROM friends f1WHERE age = ( SELECT MAX(age) FROM friendsf2 WHERE f1.state = f2.state )ORDER BY firstname, lastname It finds the oldest person in each state. HAVING can't do that, right? -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: