Created
April 6, 2023 18:12
-
-
Save maxsei/930ccd36d12993d6f42caab9cc4fbad4 to your computer and use it in GitHub Desktop.
sql query for firefox history database to show urls you visited before or after a certain query
This file contains hidden or 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
| WITH q1 AS ( | |
| SELECT | |
| mp.id, | |
| mp.origin_id, | |
| mp.site_name, | |
| mp.title, | |
| mp.url, | |
| mp.visit_count | |
| FROM | |
| moz_places mp | |
| WHERE | |
| mp.title LIKE "%vite%env.d%" | |
| ), | |
| q2 AS ( | |
| SELECT | |
| place_id | |
| FROM | |
| q1 | |
| JOIN moz_historyvisits mh ON | |
| q1.id - 5 <= mh.place_id | |
| AND mh.place_id < q1.id + 5 | |
| ) | |
| SELECT | |
| * | |
| FROM | |
| q2 | |
| JOIN moz_places mp ON | |
| mp.id = q2.place_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment