Latest code for querying Measurements based on device