MySQL · SQL
SELECT command,
COUNT(*) AS sessions,
(SELECT variable_value FROM performance_schema.global_variables WHERE variable_name = 'max_connections') AS max_connections
FROM information_schema.processlist
GROUP BY command
ORDER BY sessions DESCThis query is part of the "MySQL health" pack: connect the database in DataRunner and install the whole pack — queries, dashboard and checks — at once.