Query Cookbook

As a Bugzilla administrator, sometimes the queries I need to do are too specialized for the standard Bugzilla query page and I have to do them in SQL. I want to record some of these queries here for later reference to save me from re-inventing the wheel. Hopefully others will find this useful as well.