6,534
edits
Changes
→A SQL query to get the traffic for the last 30 days: use source tag
=== A SQL query to get the traffic for the last 30 days ===
<presource lang="mysql">
SELECT sum(bytes)
FROM Traffic
AND measuringtime > ( now() - INTERVAL 1 MONTH)
GROUP BY ip
</presource>
=== Notes ===