Changed sql from sqlite to pg