Use USING when joining erased_users

pull/14205/head
Tadeusz Sośnierz 2022-10-18 10:39:47 +02:00
parent 060d990eaa
commit 30bd2bf106
1 changed files with 1 additions and 1 deletions

View File

@ -261,7 +261,7 @@ class DataStore(
sql_base = f"""
FROM users as u
LEFT JOIN profiles AS p ON u.name = '@' || p.user_id || ':' || ?
LEFT JOIN erased_users AS eu ON u.name = eu.user_id
LEFT JOIN erased_users AS eu USING(user_id)
{where_clause}
"""
sql = "SELECT COUNT(*) as total_users " + sql_base