SELECT attacks.source, attacks.dport, count(attacks.dport) AS scans FROM attacks GROUP BY attacks.source ORDER BY attacks.source;