Make query by id