Skip to content

Instantly share code, notes, and snippets.

@sk22
Last active July 6, 2020 16:50
Show Gist options
  • Save sk22/09648768ad6c435444d76a817029d551 to your computer and use it in GitHub Desktop.
Save sk22/09648768ad6c435444d76a817029d551 to your computer and use it in GitHub Desktop.
sqlite3 /data/data/com.whatsapp/databases/msgstore.db
select date(timestamp / 1000, 'unixepoch') as date, count(*) as count from messages
where key_remote_jid = '[email protected]' /* replace with someone's phone number */
group by date;
/* find the chat partner you have the most messages with */
select count(*), key_remote_jid from messages
where key_remote_jid like '%@s.whatsapp.net'
group by key_remote_jid
order by count(*) desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment