Calcuate percentage.

From: Sze Yuen Wong <swong_(at)yahoo(dot)com>
To: pgsql-general(at)hub(dot)org
Subject: Calcuate percentage.
Date: 1999-03-09 14:54:46
Message-ID: 19990309145446.14337.rocketmail@send204.yahoomail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I need to calcuate the percentage from my table:

var1
------
1
1
1
2
2
3

Desire result:

var1 | percentage
----------------------------
1 | 50%
2 | 33%
3 | 17%

===============================

Any clue?

Please help.

Sze Wong

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sze Yuen Wong 1999-03-09 14:58:10 pgsql crash when selecting a view
Previous Message K.T. 1999-03-09 14:23:35 Re: [GENERAL] the last row in a table