Re: Counts and percentages and such

Поиск
Список
Период
Сортировка
От jackassplus
Тема Re: Counts and percentages and such
Дата
Msg-id 41ed94fb-1b9a-47e8-8803-8814ed604518@u8g2000prd.googlegroups.com
обсуждение исходный текст
Ответ на Counts and percentages and such  (jackassplus <jackassplus@gmail.com>)
Ответы Re: Counts and percentages and such  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: Counts and percentages and such  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
<snip>
> select coalesce(col,'Null'),
> (count(coalesce(col,'Null'))::numeric/(select count(*) from
> some_table))*100 from some_table group by col;
>  coalesce |        ?column?
> ----------+-------------------------
>  Null     | 13.33333333333333333300
>  N        | 20.00000000000000000000
>  A        | 26.66666666666666666700
>  L        | 40.00000000000000000000
>
> Note that it works, but we get long ugly numbers, and the column has
> no name (?column?).  Let's fix that:

What does ::numeric signify?
I'm using the jdbc driver from http://jdbc.postgresql.org/ in SQuirreL
and it asks me for the value of :numeric.


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

Предыдущее
От: erobles
Дата:
Сообщение: Linking pg_config (postgres 8.4 in SCO 5.0.7)
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Counts and percentages and such