| 2010-02-05 15:34:19 929 SQL of the day: SELECT vlan as vlan2, max(total) as total2, (select max(up) FROM `vlan_usage` where vlan = `vlan2`) as up2 , (select (`up2` / max(total)) * 100) as per, (select max(updated) FROM `vlan_usage` where up = `up2` and vlan = `vlan2`) as last FROM `vlan_usage` group by vlan2 order by per desc; |