add query by id