Skip to content
Advertisement

How to list tables in desc order of how many times they’ve been used in MYSQL?

I need to make the script list the names of relational tables together with the total number of times each table has been used.

The results must be listed in the descending order of the total number of times each one of the relational tables has been used.

Here is my code so far:

And here is what the ouput looks like:

The desired output is:

Advertisement

Answer

Try subquerying your query like this

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement