From e259e26df20b51654334fbc488296feccd0e84e6 Mon Sep 17 00:00:00 2001 From: Costas K <11378310+kacos2000@users.noreply.github.com> Date: Thu, 6 Jun 2019 15:59:14 +0300 Subject: [PATCH] Android 7 contacts --- contacts2.sql | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 contacts2.sql diff --git a/contacts2.sql b/contacts2.sql new file mode 100644 index 0000000..aec9d5a --- /dev/null +++ b/contacts2.sql @@ -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 \ No newline at end of file