Changed == to = in sql because postgres and sqlite are not the same