| От | Jean-Christian Imbeault |
|---|---|
| Тема | SELECT DISTINCT ON bug? |
| Дата | |
| Msg-id | 3ECB1E39.7080309@mega-bucks.co.jp обсуждение |
| Ответы |
Re: SELECT DISTINCT ON bug?
|
| Список | pgsql-general |
The following query give an error in 7.3 TAL=# SELECT distinct on(dai_genres.id), dsc from dai_genres, rel_genres_goods where dai_genres.id=rel_genres_goods.major_id group by id, dsc; ERROR: parser: parse error at or near "," at character 34 I looked up the 7.3 docs and I thought I had the syntax right. What's the proper syntaxt for the above query (selecting unique id's and their associated dsc from the two tables joined on id=major_id) Thanks. PS I was doing this query using GROUP BY but using distinct (on) seems like it should be faster, but I can't test it until I get the query running ... -- Jean-Christian Imbeault
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера