Re: pivot query with count

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: pivot query with count
Дата
Msg-id 1365823565069-5752077.post@n5.nabble.com
обсуждение исходный текст
Ответ на pivot query with count  (Tony Capobianco <tony.capobianco1@gmail.com>)
Ответы Re: pivot query with count  (David Johnston <polobo@yahoo.com>)
Список pgsql-sql
SELECT num_ads, sum(...), sum(...), ....
FROM ( your query here )
GROUP BY num_ads;


BTW, While "SELECT '1' "num_ads" is valid syntax I recommend you use the
"AS" keyword.  '1' AS "num_ads"

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/pivot-query-with-count-tp5752072p5752077.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



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

Предыдущее
От: Tony Capobianco
Дата:
Сообщение: pivot query with count
Следующее
От: David Johnston
Дата:
Сообщение: Re: pivot query with count