Quote (carteblanche @ Oct 17 2013 06:57pm)
you want to use a group by.
select magical_function(size*thickness), type from applications
group by type
i'm not clear how you got 49.5, so replace magical_function with whatever computes the numbers you want. you may need a CASE statement (or whatever mysql's equivalent is) if the type impacts the calculation. i thought maybe the half meant double it, but then the "two" would mean half the 20 to make 10. which isn't the case. so maybe the fact that there are two rows means double it? dunno.
Sorry if I came off unclear... I was going for grouping by the two 'half' values as in (15+10) * (.99+.99)
Thanks for the suggestion, ill start playing
Nevermind all I needed was your keyword, group by did the trick: SELECT SUM(Size)*SUM(Thickness), Type FROM Applications WHERE JobID=102 GROUP BY Type
Thanks
This post was edited by twixa on Oct 17 2013 08:08pm