SQL: orangesystem.operators: +-------------+---------+----------+--------------+---------------------------+---------------------+ | operator_id | company | password | contact_name | contact_address | joined | +-------------+---------+----------+--------------+---------------------------+---------------------+ | 3 | apitest | apitest | Gulliver | gulliverjohnson@gmail.com | 2015-04-08 20:47:42 | +-------------+---------+----------+--------------+---------------------------+---------------------+ orangesystem.identifiers: +-------------+------------+ | operator_id | identifier | +-------------+------------+ | 3 | f5f5f5f5 | +-------------+------------+ orangesystem.sensors: +-----------+-------------+-----------+--------+--------------+-------------+---------+-----------+-----------+ | global_id | operator_id | sensor_id | active | application | measures | unit | lat | lng | +-----------+-------------+-----------+--------+--------------+-------------+---------+-----------+-----------+ | 21 | 3 | 1 | 0 | Test Parking | DISTANCE | cm | 51.533805 | -0.099562 | | 22 | 3 | 2 | 0 | Test Parking | DISTANCE | cm | 51.533828 | -0.101022 | | 23 | 3 | 3 | 0 | Test Parking | DISTANCE | m | 51.533218 | -0.099916 | | 24 | 3 | 4 | 0 | Test Temp | TEMPERATURE | celcius | 51.533488 | -0.097454 | | 25 | 3 | 5 | 0 | Test Temp | TEMPERATURE | celcius | 51.536 | -0.09681 | | 26 | 3 | 6 | 0 | Test Temp | TEMPERATURE | celcius | 51.533388 | -0.100321 | +-----------+-------------+-----------+--------+--------------+-------------+---------+-----------+-----------+ CQL: orangesystem.sensor_details global_id | application | first_added | lat | lng | measures | reading | timestamp | unit -----------+--------------+--------------------------+-----------+-----------+-------------+---------+-----------+--------- 21 | Test Parking | 2015-04-08 21:05:19+0100 | 51.533805 | -0.099562 | DISTANCE | null | null | cm 22 | Test Parking | 2015-04-08 21:05:43+0100 | 51.533828 | -0.101022 | DISTANCE | null | null | cm 23 | Test Parking | 2015-04-08 21:06:02+0100 | 51.533218 | -0.099916 | DISTANCE | null | null | cm 24 | Test Temp | 2015-04-08 21:06:42+0100 | 51.533488 | -0.097454 | TEMPERATURE | null | null | celcius 25 | Test Temp | 2015-04-08 21:07:03+0100 | 51.536 | -0.09681 | TEMPERATURE | null | null | celcius 26 | Test Temp | 2015-04-08 21:07:22+0100 | 51.533388 | -0.100321 | TEMPERATURE | null | null | celcius //////////////////////////////// Input Details First input: 1428523920000 Second input: 1428524160000 Third input: 1428524400000 Fourth input: 1428524640000 Fifth input: 1428524880000 /// Sensor 21: global_id | application | first_added | lat | lng | measures | reading | timestamp | unit -----------+--------------+--------------------------+-----------+-----------+----------+---------+--------------------------+------ 21 | Test Parking | 2015-04-08 21:05:19+0100 | 51.533805 | -0.099562 | DISTANCE | 29 | 2015-04-08 21:27:57+0100 | cm global_id | timestamp | reading -----------+--------------------------+--------- 21 | 2015-04-08 21:12:54+0100 | 30 21 | 2015-04-08 21:16:51+0100 | 33 21 | 2015-04-08 21:20:09+0100 | 32 21 | 2015-04-08 21:24:31+0100 | 29 21 | 2015-04-08 21:27:57+0100 | 29 /// Sensor 22: global_id | application | first_added | lat | lng | measures | reading | timestamp | unit -----------+--------------+--------------------------+-----------+-----------+----------+---------+--------------------------+------ 22 | Test Parking | 2015-04-08 21:05:43+0100 | 51.533828 | -0.101022 | DISTANCE | 21 | 2015-04-08 21:28:08+0100 | cm global_id | timestamp | reading -----------+--------------------------+--------- 22 | 2015-04-08 21:13:05+0100 | 27 22 | 2015-04-08 21:17:02+0100 | 90 22 | 2015-04-08 21:20:14+0100 | 94 22 | 2015-04-08 21:24:44+0100 | 25 22 | 2015-04-08 21:28:08+0100 | 21 /// Sensor 23: global_id | application | first_added | lat | lng | measures | reading | timestamp | unit -----------+--------------+--------------------------+-----------+-----------+----------+---------+--------------------------+------ 23 | Test Parking | 2015-04-08 21:06:02+0100 | 51.533218 | -0.099916 | DISTANCE | 33 | 2015-04-08 21:28:02+0100 | cm global_id | timestamp | reading -----------+--------------------------+--------- 23 | 2015-04-08 21:13:11+0100 | 85 23 | 2015-04-08 21:17:08+0100 | 28 23 | 2015-04-08 21:20:23+0100 | 36 23 | 2015-04-08 21:24:35+0100 | 35 23 | 2015-04-08 21:28:02+0100 | 33 /// Sensor 24: global_id | application | first_added | lat | lng | measures | reading | timestamp | unit -----------+-------------+--------------------------+-----------+-----------+-------------+---------+--------------------------+--------- 24 | Test Temp | 2015-04-08 21:06:42+0100 | 51.533488 | -0.097454 | TEMPERATURE | 17 | 2015-04-08 21:28:13+0100 | celcius global_id | timestamp | reading -----------+--------------------------+------------- 24 | 2015-04-08 21:13:19+0100 | 17.60000038 24 | 2015-04-08 21:17:13+0100 | 17.5 24 | 2015-04-08 21:20:29+0100 | 17.39999962 24 | 2015-04-08 21:24:49+0100 | 17.20000076 24 | 2015-04-08 21:28:13+0100 | 17 /// Sensor 25: global_id | application | first_added | lat | lng | measures | reading | timestamp | unit -----------+-------------+--------------------------+--------+----------+-------------+-------------+--------------------------+--------- 25 | Test Temp | 2015-04-08 21:07:03+0100 | 51.536 | -0.09681 | TEMPERATURE | 17.29999924 | 2015-04-08 21:28:18+0100 | celcius global_id | timestamp | reading -----------+--------------------------+------------- 25 | 2015-04-08 21:13:36+0100 | 18.5 25 | 2015-04-08 21:17:17+0100 | 18 25 | 2015-04-08 21:20:37+0100 | 17.79999924 25 | 2015-04-08 21:24:54+0100 | 17.5 25 | 2015-04-08 21:28:18+0100 | 17.29999924 /// Sensor 26: global_id | application | first_added | lat | lng | measures | reading | timestamp | unit -----------+-------------+--------------------------+-----------+-----------+-------------+---------+--------------------------+--------- 26 | Test Temp | 2015-04-08 21:07:22+0100 | 51.533388 | -0.100321 | TEMPERATURE | 16.5 | 2015-04-08 21:28:21+0100 | celcius global_id | timestamp | reading -----------+--------------------------+------------- 26 | 2015-04-08 21:13:44+0100 | 17.39999962 26 | 2015-04-08 21:17:20+0100 | 17 26 | 2015-04-08 21:20:49+0100 | 16.60000038 26 | 2015-04-08 21:25:00+0100 | 16.5 26 | 2015-04-08 21:28:21+0100 | 16.5