Re: [GENERAL] Result of ORDER-BY

2011-11-18 Thread Good Day Books
See the other remark in this thread about GROUP BY and ORDER BY. Note that GROUP BY used to cause ORDER BY every time, because it was always implemented with a sort. That hasn't been true for several releases, and if you're relying on that side effect it could be the cause of this, although

Re: [GENERAL] Result of ORDER-BY

2011-11-18 Thread Good Day Books
The query as shown does't actually have an ORDER BY clause in it; did you write GROUP BY where you meant ORDER BY? Thank you for your reply. I tried all combinations - GROUP BY - ORDER BY - GROUP BY ORDER BY the result is always the same. -- Sent via pgsql-general mailing list

[GENERAL] Result of ORDER-BY

2011-11-17 Thread Good Day Books
[PostgreSQL 8.3.9] I have a query, as follows SELECT DISTINCT ON(category) category FROM gdb_books WHERE category LIKE 'Fiction%' GROUP BY category The (partial) result is this: ... # Fiction - General (A) # Fiction - General - Anthologies # Fiction - General (B) # Fiction - General (C) #