I'd like to know the SQL queries to get the details of the following:
Thats quite a lot of work to nest queries that will do just this. If i were you, you could always install this plugin and enable mysql logging to see what queries the system would do itself to generate the same statistic:
Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time! We're looking for people to participate in a remote 1-hr workshop...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs