-- select time,addr,json->'type',json->'sensor_data',json->'battery',json->'battery_percent',json->'counter',json->'original'->'data' from eg5120 ;

count(*),min(time),max(time),sensor_type,json->'original'->'mac' as mac,json->'sensor_name' as sensor_name from eg5120 group by sensor_type,sensor_name,json->'original'->'mac' ;
