Last active
July 17, 2017 06:07
-
-
Save bencharb/b736603a18177feccd69c09e9515a14f to your computer and use it in GitHub Desktop.
Apple Messages query messages from person
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
QUERY Apple Messages sqlite database | |
at ~/Library/Messages/chat.db | |
*/ | |
select | |
datetime(m.date + strftime('%s','2001-01-01'), 'unixepoch', 'localtime') as dt | |
, m.text | |
, c.chat_identifier | |
from | |
message as m | |
, chat AS c | |
JOIN | |
chat_message_join cmj ON | |
cmj.message_id = m.ROWID | |
AND cmj.chat_id = c.ROWID | |
WHERE | |
m.is_from_me = 0 | |
AND | |
c.chat_identifier = "+15555555555" | |
--AND m.text LIKE '%ok%' | |
order by m.date |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment