Top Queries

Please make sure you have read through the Prerequisites / Basic Set-up .

You will need to fit the name of the datasource to your own Confluence installation.

See your top 10 queries ordered by amount of all time views.

image-20201020-081800.png

Query

SQL
SELECT QUERY_NAME,
       COUNT(ID) AS VIEWS
FROM AO_AD3311_MACRO_USAGE
GROUP BY QUERY_NAME
ORDER BY VIEWS desc
LIMIT 10;

TIP: Add a WHERE clause to see the top 10 queries of the month, or week. For MySQL you could use this:

SQL
WHERE DATE >= DATE_ADD(CURDATE(), INTERVAL -7 DAY)

Template

HTML
<script>
PocketQuery.chart('ColumnChart', {
  legend: {position:'none'}
});
</script>