added join so room names show up instead of IDs to the biggest rooms on server sql
parent
91534242ac
commit
8a1f607c33
11
Home.md
11
Home.md
|
|
@ -105,6 +105,13 @@ The log format can vary slightly depending on your log configuration, but here i
|
||||||
What are the biggest rooms on my server?
|
What are the biggest rooms on my server?
|
||||||
---
|
---
|
||||||
|
|
||||||
```
|
```sql
|
||||||
select room_id, count(*) as num_rows from state_groups_state group by room_id order by num_rows desc limit 10;
|
SELECT s.canonical_alias, g.room_id, count(*) AS num_rows
|
||||||
|
FROM
|
||||||
|
state_groups_state AS g,
|
||||||
|
room_stats_state AS s
|
||||||
|
WHERE g.room_id = s.room_id
|
||||||
|
GROUP BY s.canonical_alias, g.room_id
|
||||||
|
ORDER BY num_rows desc
|
||||||
|
LIMIT 10;
|
||||||
```
|
```
|
||||||
Loading…
Reference in New Issue