percentages of a column

Поиск
Список
Период
Сортировка
От Andreas
Тема percentages of a column
Дата
Msg-id 4685BC84.2090106@gmx.net
обсуждение исходный текст
Ответы Re: percentages of a column  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-sql
Hi,

There is a Select that calculates some SUMs of objects.
I'd like to show a list of counts and percentages of this counts based 
on the sum of all counts.
Is that possible in a SELECT statement?

Example:  

Fruit          Count       %
--------------------------
Bananas       5          10%
Apples       15          30%
Oranges     30          60%




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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: Is index usage in LIKE-queries with UTF-8 implemented in PG-8.3 ?
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: percentages of a column