[ 
https://issues.apache.org/jira/browse/IOTDB-622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094177#comment-17094177
 ] 

Xiangdong Huang commented on IOTDB-622:
---------------------------------------

Yes level 0 is for group by all time series which start with "root"

 

> level seems can't express those sqls: like root.sgcc.wf03.wt01, but I want to 
>group by sgcc, wt01.

Well, we need to extent the SQL grammar:

 

SELECT ... 

FROM ...

GROUP BY  time_interval |  LEVEL n (,n2)* | time_interval, LEVEL n (,n2)*.

 

Then use sql "select count(s1) from root.sgcc.*.wt01.* GROUP BY LEVEL 1,3" 
(only "sgcc" and "wt01" are chosen), or "select count(s1) from root.* GROUP BY 
LEVEL 1,3" (the values in level 1 and level 3 form a pair)

 

 

 

> count all records of the whole database
> ---------------------------------------
>
>                 Key: IOTDB-622
>                 URL: https://issues.apache.org/jira/browse/IOTDB-622
>             Project: Apache IoTDB
>          Issue Type: Improvement
>          Components: Core/Engine
>            Reporter: WangChao
>            Assignee: WangChao
>            Priority: Trivial
>
> Now the count function only count the number of every timeseries, it's useful 
> to  count the total record of the  specific path.
>  
> like:
>  
> *_select count(*) from root.ln._**  should return the total number of the 
> records in storage group root.ln, but now it returns the number of each 
> timeseries which is in root.ln.
>  
> Please leave your opinion. 
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to