Re: Help with query involving aggregation and joining.

Поиск
Список
Период
Сортировка
От Christoph Haller
Тема Re: Help with query involving aggregation and joining.
Дата
Msg-id 3E5A22EA.B1904F75@rodos.fzk.de
обсуждение исходный текст
Ответ на Help with query involving aggregation and joining.  (Eddie Cheung <vampyre5@yahoo.com>)
Ответы Re: Help with query involving aggregation and joining.  (<mallah@trade-india.com>)
Список pgsql-sql
>
> ERROR:
> SELECT DISTINCT ON expressions must match
> initial ORDER BY expressions may be gotten over by
> wrapping the first query result in a subselect.
>
> not sure though if its proper.
> regds
> mallah.
>
> test=# SELECT * from ( SELECT  distinct on (a.id) b.id
> ,courseid,name,submission   from course a join  history b on
> (a.id=b.courseid)  )  as results order by results.submission desc;
>
I'm currently working with
select version();                           version
---------------------------------------------------------------PostgreSQL 7.2.3 on hppa-hp-hpux10.20, compiled by GCC
2.95.2
(1 row)
I've used your table definitions and sample data you've sent earlier
and do not receive an error message on the above SELECT statement.
Did you?

Regards, Christoph




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

Предыдущее
От: Rajesh Kumar Mallah
Дата:
Сообщение: Re: Help with query involving aggregation and joining.
Следующее
От: Jeff Eckermann
Дата:
Сообщение: Re: syntax question