Skip to content

Instantly share code, notes, and snippets.

@markjaquith
Created February 7, 2016 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markjaquith/633d9201a22ef38259f0 to your computer and use it in GitHub Desktop.
Save markjaquith/633d9201a22ef38259f0 to your computer and use it in GitHub Desktop.
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