From: | Richi Plana <richip(at)mozcom(dot)com> |
---|---|
To: | pgsql-sql(at)hub(dot)org |
Subject: | Finding strange patters |
Date: | 1999-04-01 00:57:54 |
Message-ID: | Pine.LNX.4.04.9904010852380.12452-100000@jaguar.mozcom.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
Given a table A(name char(20), value float), is it possible to select a
tuples whose value varies by a certain amount from the average of all
values with same names? ie.
SELECT name AS tempname, value FROM A WHERE value/(SELECT AVG(value) FROM
A WHERE name = tempname) > 0.75;
L L Richi Plana 8^) ,-,-. ,-,-. ,-,-. ,-,-. ,-
LL LL Systems Administrator / / \ \ / / \ \ / / \ \ / / \ \ / /
LLLLL Mosaic Communications, Inc. \ \ / / \ \ / / \ \ / / \ \ / /
LLLLL mailto:richip(at)mozcom(dot)com `-'-' `-'-' `-'-' `-'-'
------------------------------------------------------------------------
P G P Key available at http://www2.mozcom.com/~richip/richip.asc
Tired of Spam? Join this CAUCE! http://www.cauce.org/
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Chalmers | 1999-04-01 03:53:58 | How do I return values that begin with non-alphabet characters from a search? |
Previous Message | Jackson, DeJuan | 1999-03-31 21:06:00 | RE: [SQL] Retrieving the record not matched with a join. |