The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

invoke <SQL expert> by richllleeds 2003-03-18 03:55:48
Morning Ufies [GMT +1] Throwing myself at the feet of your collective knowledge: I'm trying to pull some statistics out of an SQL data set. Specifically, the 25th & 75th percentile. I don't know exactly how big the data set will be, so I'm trying the following code:
SELECT COUNT(dose) AS dosecount
FROM sub12
WHERE exclude != 'y';

SELECT FIRST 1 result
FROM (SELECT OrderedVal result
      FROM (SELECT FIRST (25*dosecount) dose AS OrderedVal 
            FROM sub12
            ORDER BY dose DESC)
     ) AS dose25;
FYI: I'm working with a ColdFusion front end to an informix DB. Any thoughts gratefully received
[ Reply ]
  I'd go with something like this: by Khaar2003-03-18 04:13:17
  I only know Oracle by Spisefisken2003-03-18 04:38:19

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)