updated database: delete from stops where rowid not in (select max(rowid) from stops group by stopid); //remove duplicate stops