Last active
June 27, 2018 06:52
-
-
Save CorneAussems/84422afc82d2dd18e465adf79a881d1c to your computer and use it in GitHub Desktop.
Skype SqlLite Database Queries
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
cd /Users/corne/Library/Application\ Support/Skype/corne.aussems/ | |
cp main.db main-bak.db | |
sqlite3 main-bak.db | |
/** pretty print **/ | |
sqlite3 -separator $'\t' -header -cmd '.mode columns' main-bak.db ; | |
/** You want to know what you wrote in each Conversation last 2 days **/ | |
SELECT displayname,from_dispname, datetime(Messages.timestamp, 'unixepoch') AS date, body_xml | |
FROM Messages LEFT JOIN Conversations on Messages.chatname = Conversations.identity | |
WHERE Messages.timestamp BETWEEN strftime('%s','now', '-2 days') AND strftime('%s','now') | |
AND author = 'corne.aussems' | |
group by displayname, date | |
ORDER BY date ; | |
/** You want to know what you wrote sequentially for last 2 days **/ | |
SELECT datetime(Messages.timestamp, 'unixepoch') AS date, displayname, from_dispname, substr(body_xml,0,50) | |
FROM Messages LEFT JOIN Conversations on Messages.chatname = Conversations.identity | |
WHERE Messages.timestamp BETWEEN strftime('%s','now', '-2 days') AND strftime('%s','now') | |
AND author = 'corne.aussems' | |
ORDER BY date ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment