The SQL queries are above in the original bug report.
—Reply to this email directly or view it on GitHub.