pritn query wtih result