Трафик Получено и Трафик Отправлено Sort и не равно Трафик

ps. данная проблема присутствует в версиях 0.4х
Код: Выделить всё
select br,bs,Total from (select *,br+bs Total from(select fio,round(brv/1024/1024,1) br,round(bst/1024/1024,1) bs from (select fio,sum(recv) brv,sum(sent) bst from (select start,tp_id,sent,recv,fio,gid from dv_log left join users_pi on dv_log.uid=users_pi.uid left join users on dv_log.uid=users.uid where start>='2008-09-01' and start<'2008-10-01') f0 group by fio)f1)f2)f3 order by total desc limit 10;
Код: Выделить всё
+---------+---------+----------+
| br | bs | Total |
+---------+---------+----------+
| 54394.8 | 51459.9 | 105854.7 |
| 14019.1 | 11943.9 | 25963.0 |
| 13054.7 | 10869.6 | 23924.3 |
| 13325.2 | 5691.3 | 19016.5 |
| 7118.4 | 2797.9 | 9916.3 |
| 2728.3 | 3506.4 | 6234.7 |
| 3835.0 | 336.0 | 4171.0 |
| 2953.5 | 308.7 | 3262.2 |
| 2956.3 | 134.7 | 3091.0 |
| 2752.3 | 132.5 | 2884.8 |
+---------+---------+----------+
Код: Выделить всё
select br,bs,Total from (select *,br+bs Total from(select fio,round(brv/1024/1024,1) br,round(bst/1024/1024,1) bs from (select fio,sum(recv)+sum(acct_input_gigawords)*4096*1024*1024 brv,sum(sent)+sum(acct_output_gigawords)*4096*1024*1024 bst from (select start,tp_id,sent,recv,fio,gid,acct_input_gigawords,acct_output_gigawords from dv_log left join users_pi on dv_log.uid=users_pi.uid left join users on dv_log.uid=users.uid where start>='2008-09-01' and start<'2008-10-01') f0 group by fio)f1)f2)f3 order by total desc limit 10;
Код: Выделить всё
+----------+----------+----------+
| br | bs | Total |
+----------+----------+----------+
| 218234.8 | 309507.9 | 527742.7 |
| 22211.1 | 44711.9 | 66923.0 |
| 11214.4 | 15085.9 | 26300.3 |
| 13054.7 | 10869.6 | 23924.3 |
| 17421.2 | 5691.3 | 23112.5 |
| 2728.3 | 3506.4 | 6234.7 |
| 3835.0 | 336.0 | 4171.0 |
| 2953.5 | 308.7 | 3262.2 |
| 2956.3 | 134.7 | 3091.0 |
| 2752.3 | 132.5 | 2884.8 |
+----------+----------+----------+