Re: Doing sum's if certain conditions are true

2006-08-29 Thread Visolve DB TEAM
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

2006-08-29 Thread Jay Blanchard
[snip] +---+--+---+-+-- +-+ | code | bin | min | ain | cin | dur | +---+--+---+-+-- +-+ |