1,19 → 1,4 |
select host, source, round((base + delta) / 1024 / 1024) as count, stamp from tcount |
where source = 'tun0_out' |
and stamp in ( |
( |
select min(stamp) from tcount |
where source = 'tun0_out' |
and extract(month from stamp) = 8 |
and extract(year from stamp) = 2003 |
group by extract(day from stamp) |
) |
union |
( |
select min(stamp) from tcount |
where source = 'tun0_out' |
and extract(month from stamp) = 9 |
and extract(year from stamp) = 2003 |
) |
) |
order by stamp |
select source, day, round((endvalue-beginvalue) / 1024 / 1024) as count |
from tdays |
where date_trunc('month', day) = '1 Jan 2004' |
order by source, day; |