Created
February 20, 2016 12:10
-
-
Save zyguan/6e64fbc5f729f4b7206c to your computer and use it in GitHub Desktop.
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
-- Firefox saves your browsing history data in places.sqlite. So it's | |
-- possible to know about your behavior by a sql select statement. | |
-- Here is an example. | |
-- | |
-- (https://support.mozilla.org/en-US/kb/recovering-important-data-from-an-old-profile) | |
-- | |
SELECT host, count(*) FROM moz_historyvisits h LEFT JOIN | |
(SELECT id, substr(substr(url, instr(url,'://')+3), | |
0,instr(substr(url, instr(url,'://')+3),'/')) AS host | |
FROM moz_places WHERE substr(url,0,5) = 'http') p ON h.place_id = p.id | |
GROUP BY host ORDER BY count(*) DESC LIMIT 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment