Counts and percentages and such

Поиск
Список
Период
Сортировка
От jackassplus
Тема Counts and percentages and such
Дата
Msg-id ba347e2e-cc86-415f-9d1c-d72cc50ea284@z10g2000prh.googlegroups.com
обсуждение исходный текст
Ответы Re: Counts and percentages and such  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
I'm new to both pgsql and SQL in  general pas really simple stuff, so
i would like to know how to;

Given a table with a column that can have one of NULL, (char) N,
(char) A, and (char) L. Is there a way to in a single query, ge the
percentage of the whole rowset that each of those represents?

like :

75% Null
15% A
5% N
5% L

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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Tuesday (PST8PDT) Jeff Davis Presents: Operator Exclusion Constraints
Следующее
От: Richard Broersma
Дата:
Сообщение: Re: Implementing next 30 (or so) rows "sliding window"