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.

Query

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:

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


Template

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




PQMU-top-queries.xml


Download the export file with the entities on the left and import it in your PocketQuery administration.