All pastes #823303 Raw Edit

Mine

public text v1 · immutable
·published 2007-12-19 08:30 UTC
rendered paste body
SELECT hostid,t1.hw_code,incoming,outgoing,total,quota,percent_used,time_created FROM bandwidth_log JOIN (SELECT hw_code, MAX(id) AS id FROM bandwidth_log GROUP BY hw_code) AS t1 USING(hw_code,id) WHERE percent_used>=80 ORDER BY percent_used DESC