All pastes #708876 Raw Edit

Someone

public text v1 · immutable
#708876 ·published 2007-09-24 05:55 UTC
rendered paste body
SELECT scanner, SUM(havefile) AS havefile, COUNT(*) AS total, ROUND(SUM(havefile) / 1.0 / COUNT(*) * 100, 2) AS percent, ROUND(SUM(CASE WHEN havefile = '1' THEN size / 1024.0 / 1024.0 ELSE 0 END), 2) AS size FROM \"$dbtabl\" GROUP BY scanner ORDER BY LOWER(scanner);