Remove distinct from query.  Sqlite has no support