Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
iMessage texting stats
SELECT COUNT(*) as messages_count, handle.id as person from message JOIN handle on handle.ROWID = message.handle_id WHERE strftime( '%Y-%m', datetime(message.date + strftime('%s','2001-01-01'), 'unixepoch')) = '2016-01' GROUP BY handle_id ORDER BY messages_count DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.