Counts and percentages and such - Mailing list pgsql-general

From jackassplus
Subject Counts and percentages and such
Date
Msg-id ba347e2e-cc86-415f-9d1c-d72cc50ea284@z10g2000prh.googlegroups.com
Whole thread Raw
Responses Re: Counts and percentages and such  (Scott Marlowe <scott.marlowe@gmail.com>)
List 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 by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Tuesday (PST8PDT) Jeff Davis Presents: Operator Exclusion Constraints
Next
From: Richard Broersma
Date:
Subject: Re: Implementing next 30 (or so) rows "sliding window"