build QueryInfo
pay attention to the clash of variable name