Thanks Julien, with the mentioned queries from you, I was able to get the information but in silos, I probably need to write a script in order to get one consolidated report for the above 3 points. Is there a database query that can simply give the above information in a single report?
Running queries against a production database actively serving an application is not a good idea — and the SonarQube database should be treated as a black box: it is not publicly documented and it can change at anytime from version to version without warning.
Our Web APIs however have clear documentation available as well as consistent deprecation strategies when they are altered (a deprecated parameter will, for example, still be available for 2 major versions post-deprecation before being removed). Assuming you want to run your report more than once across multiple versions of SonarQube, this is very important!