Ratios

  • 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

  • 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