Re: Doing sum's if certain conditions are true
Hello Ian barnes I hope this query will resolve your problem if my understanding is correct SELECT code1, SUM(bytes) as sumofbytes, MAX(bytes) as maximum, MIN(bytes) as minimum, COUNT(bytes) as bytecount, SUM(duration) as duration, AVG(bytes) as averagebyte FROM mytable where code1<>'none' and
RE: Doing sum's if certain conditions are true
[snip] +---+--+---+-+-- +-+ | code | bin | min | ain | cin | dur | +---+--+---+-+-- +-+ |