Clean-up query formatting
This commit is contained in:
parent
6ee96e9366
commit
d79caed493
|
@ -131,8 +131,10 @@ class RoomMemberWorkerStore(EventsWorkerStore, CacheInvalidationWorkerStore):
|
|||
query = """
|
||||
SELECT COUNT(DISTINCT substr(out.user_id, pos+1))
|
||||
FROM (
|
||||
SELECT rm.user_id as user_id, instr(rm.user_id, ':')
|
||||
AS pos FROM room_memberships as rm
|
||||
SELECT
|
||||
rm.user_id AS user_id,
|
||||
instr(rm.user_id, ':') AS pos
|
||||
FROM room_memberships as rm
|
||||
INNER JOIN current_state_events as c ON rm.event_id = c.event_id
|
||||
WHERE c.type = 'm.room.member'
|
||||
) as out
|
||||
|
|
Loading…
Reference in New Issue