Stats querying by deviceId begin/end dates