SQL
AخA
SELECT LEFT(rev_timestamp, 6), COUNT(*)
FROM revision
JOIN comment_revision ON comment_id = rev_comment_id
WHERE comment_text LIKE '%ReferenceExpander%'
AND rev_timestamp BETWEEN '2020' AND '2021' -- any range longer than about a year does a full table scan
GROUP BY LEFT(rev_timestamp, 6)
UNION
SELECT LEFT(rev_timestamp, 6), COUNT(*)
FROM revision
JOIN comment_revision ON comment_id = rev_comment_id
WHERE comment_text LIKE '%ReferenceExpander%'
AND rev_timestamp BETWEEN '2021' AND '2022'
GROUP BY LEFT(rev_timestamp, 6)
UNION
SELECT LEFT(rev_timestamp, 6), COUNT(*)
FROM revision
JOIN comment_revision ON comment_id = rev_comment_id
WHERE comment_text LIKE '%ReferenceExpander%'
AND rev_timestamp BETWEEN '2022' AND '2023'
GROUP BY LEFT(rev_timestamp, 6)
UNION
SELECT LEFT(rev_timestamp, 6), COUNT(*)
FROM revision
JOIN comment_revision ON comment_id = rev_comment_id
WHERE comment_text LIKE '%ReferenceExpander%'
AND rev_timestamp >= '2023'
GROUP BY LEFT(rev_timestamp, 6);
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.