-
Notifications
You must be signed in to change notification settings - Fork 0
/
are_there_missing_user_ids.sql
51 lines (51 loc) · 1.2 KB
/
are_there_missing_user_ids.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
select user_id from (
select user_id from account_account
union
select user_id from account_accountdeletion
union
select user_id from account_emailaddress
union
select inviter_id from account_signupcode
union
select user_id from account_signupcoderesult
union
select user_id from actstream_follow
union
select user_id from agon_ratings_rating
union
select creator_id from announcements_announcement
union
select user_id from announcements_dismissal
union
select user_id from auth_user_groups
union
select user_id from auth_user_user_permissions
union
select user_id from avatar_avatar
union
select owner_id from base_resourcebase
union
select author_id from dialogos_comment
union
select user_id from django_admin_log
union
select user_id from django_comment_flags
union
select user_id from django_comments
union
select user_id from notification_noticesetting
union
select user_id from people_profile
union
select user_id from security_userobjectrolemapping
union
select user_id from upload_upload
union
select sender_id from user_messages_message
union
select user_id from user_messages_userthread
union
select author_id from zinnia_entry_authors) v1
where not exists (
select id from auth_user t1
where t1.id = v1.user_id)