See http://lists.wikimedia.org/pipermail/wikitech-l/2013-June/070006.html for confusion.
Query (untested!) should probably become
SELECT product.name, component.name, count(*) as total FROM bugs JOIN components on bugs.component_id = components.id JOIN products on bugs.product_id = products.id WHERE creation_ts BETWEEN "$begin_date" AND "$end_date" GROUP BY component_id ORDER BY total DESC LIMIT 5;
in https://git.wikimedia.org/blob/operations%2Fpuppet.git/HEAD/templates%2Fmisc%2Fbugzilla_report.php line 27
Version: wmf-deployment
Severity: minor