Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

percentages of a column



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%





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group