Skip to content

Instantly share code, notes, and snippets.

@trengrj
Last active November 11, 2015 12:03
Show Gist options
  • Save trengrj/1d2ac7d9f0c603b36de2 to your computer and use it in GitHub Desktop.
Save trengrj/1d2ac7d9f0c603b36de2 to your computer and use it in GitHub Desktop.
library(DBI)
library(RSQLite)
con <- dbConnect(SQLite(), "places.sqlite")
alltables = dbListTables(con)
hosts = dbGetQuery( con,'select * from moz_hosts order by frecency desc' )
places = dbGetQuery( con,'select * from moz_places order by visit_count desc' )
visits = dbGetQuery(con, 'select datetime(last_visit_date/1000000,\'unixepoch\',\'localtime\') as last_visit,
v.id as visit_id, p.id as place_id, v.from_visit, v.visit_type, p.url,
p.title from moz_historyvisits v left join moz_places p on v.place_id = p.id
where p.visit_count > 0')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment