eily
Say Hey Kid
Points: 661
More actions
March 10, 2003 at 10:14 am
#81137
I have an Ideas Table with the following fields
ideas_id
iDEAS_sTATUS
(i.e submitted
in draft
in progress
implemented )
dateSubmitted
dateImplemented
i need a formula to calculate the Ratio of the number of Implemented to Raised ideas averaged over a 3 month period
can't seem to get my head around this
thanking you inadvance
cheers
mromm
SSCarpal Tunnel
Points: 4301
March 10, 2003 at 10:44 am
#450707
To accomplish this is one SELECT statement, something like this would work:
SELECTSUM( CASE iDEAS_sTATUS WHEN 'implemented' THEN 1. ELSE 0. END ) / COUNT(*)
FROMIdeas
WHEREdateSubmitted BETWEEN ...
Edited by - mromm on 03/10/2003 10:45:43 AM
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply