You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/03/03 19:38:25 UTC

[GitHub] [iotdb] ope-nz opened a new issue #2769: Question; Listing Unique Sensor Values (not numeric)

ope-nz opened a new issue #2769:
URL: https://github.com/apache/iotdb/issues/2769


   Scenario; I have a sensor that returns a string value for example red, blue, green - lets call the sensor "color"
   
   If I dont know all the possible values but want to retrieve them from the database via query is there any query I can run?
   
   In a normal RDBMS I could run either of these queries;
   
   "select distinct color from table" and I would get the unique values.
   Or 
   "select color,count(color) from table group by color" and I would get the unique values and their count.
   
   In iotDB "group by" only works for time so its not possible to run a query using group by.
   
   Question; Is there any query that would achieve this?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] ope-nz closed issue #2769: Question; Listing Unique Sensor Values (not numeric)

Posted by GitBox <gi...@apache.org>.
ope-nz closed issue #2769:
URL: https://github.com/apache/iotdb/issues/2769


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] ope-nz commented on issue #2769: Question; Listing Unique Sensor Values (not numeric)

Posted by GitBox <gi...@apache.org>.
ope-nz commented on issue #2769:
URL: https://github.com/apache/iotdb/issues/2769#issuecomment-793029683


   Thanks @jixuan1989 I will join the mailing list.
   
   I couldnt see a way to achive this either. I have resorted to storing the list in a RDBMS with a unique key and am storing the key in iotDB. It cuts down on iotDB storage too.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] jixuan1989 commented on issue #2769: Question; Listing Unique Sensor Values (not numeric)

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #2769:
URL: https://github.com/apache/iotdb/issues/2769#issuecomment-792621293


   Hi ope-nz, 
   At least, IoTDB does not support that currently...
   
   "Group by" in IoTDB:
   1. Group by time interval.
   2. Group by partial path of series, e.g., group by level=1,
   e.g., you have two prefix path: `root.china.a`, `root.china.b`, `root.newzealand.a`,
    `select count(*) from root group by level=1` will returns the the total count of data points that belongs to China, and the total counts of data points taht belongs to New Zealand.
   
   3. Group by data value is not supported now..
   Quickly thinking, I have no a very efficient algorithm to implement it...
   
   How do you think?
   
   BYW, send mails to  dev@iotdb.apache.org (subscribe dev-subscribe@iotdb.apache.org before your first sending email) if you can not get responses from github issues (Some guys in the community like Github issue, but for me, I rarely read these issues... and mainly focus the mailing list..)
   
   
   
   
   
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org