it might be useful 4 some1 ... here it goes ...
select activity, cast(sum(affected) as integer)as "Attempts",
cast(sum(failed) as integer) as "Failed", cast((1-(cast(sum(failed) as
decimal(18,3))/sum(affected)))*100 as decimal(8,2)) as "% Success" from
summary where start_time>timestamp(current_date-8 day,'00:00:00') group by
activity
goran.
|