Ken Ferguson wrote:
>  
> So, I'd like to see:
> John - 40% - 5 incidents
> Sue - 50% - 4 incidents
>  

Try something like this...

SELECT p.personName,(SUM(CASE t.tool WHEN '-5' THEN 100 ELSE 0 
END)/count(t.tool)) as notoolpercent
FROM People p INNER JOIN ToolsUsed t ON p.IncID = t.IncID
GROUP BY p.personname

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262669
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to