Efficient Query Processing for Opportunistic Sensor Networks