Created
July 22, 2022 16:48
-
-
Save anonfloppa/459948579fb049830081d9ae0b302566 to your computer and use it in GitHub Desktop.
A query to list all uploaded media to a room in particular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
event_json.json::json->'content'->>'body' as filename, | |
event_json.json::json->'content'->>'url' as url | |
from events | |
left outer join event_json on | |
events.event_id=event_json.event_id | |
left outer join room_stats_state on | |
room_stats_state.room_id=events.room_id | |
where event_json.json::json->'content'->>'url'<>'' and events.room_id='ROOM ID' limit 1000; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment