Filter query by identifier