mirror of
https://github.com/kacos2000/Queries
synced 2024-11-13 19:10:42 +00:00
Android 7 contacts
This commit is contained in:
parent
931d4fe4d7
commit
e259e26df2
38
contacts2.sql
Normal file
38
contacts2.sql
Normal file
@ -0,0 +1,38 @@
|
||||
select
|
||||
raw_contacts._id,
|
||||
photo_id,
|
||||
photo_file_id,
|
||||
|
||||
accounts.account_name,
|
||||
case raw_contacts.deleted
|
||||
when 1 then 'Yes'
|
||||
end as 'deleted',
|
||||
case raw_contacts.starred
|
||||
when 1 then 'Yes'
|
||||
end as'starred',
|
||||
case raw_contacts.pinned
|
||||
when 1 then 'Yes'
|
||||
end as 'pinned',
|
||||
case has_phone_number
|
||||
when 1 then 'Yes'
|
||||
end as 'hasnumber',
|
||||
case raw_contacts.send_to_voicemail
|
||||
when 1 then 'Yes'
|
||||
end as 'sendtovoicemail',
|
||||
raw_contacts.display_name,
|
||||
search_index.content as 'content',
|
||||
groups.title as 'group',
|
||||
raw_contacts.times_contacted,
|
||||
raw_contacts.last_time_contacted,
|
||||
contact_last_updated_timestamp,
|
||||
phonebook_bucket,
|
||||
raw_contacts.sync1,
|
||||
raw_contacts.sync2,
|
||||
raw_contacts.sync3,
|
||||
raw_contacts.sync4
|
||||
|
||||
from raw_contacts
|
||||
join contacts on raw_contacts._id = contacts.name_raw_contact_id
|
||||
join accounts on accounts._id = raw_contacts.account_id
|
||||
join groups on groups._id = raw_contacts.account_id
|
||||
left join search_index on search_index.contact_id=raw_contacts.contact_id
|
Loading…
Reference in New Issue
Block a user