0

I am getting this as a problem:

{0,riak_ql_parser, <<"Used group as a measure of time in 712903232group. Only s, m, h and d are allowed.

My Query:

select memberId,COUNT(memberId) from Emp18 where start>1478925732000 and start< 1478925939000 and end>1478913322000 and memberId<712903232 group by memberId;

but I am getting response with following query:

select memberId,COUNT(memberId) from Emp18 where start>1478925732000 and start< 1478925939000 and end>1478913322000 and memberId<712903232;

and I am getting output as :

+---------+-----+---------------+
|memberId |steps|COUNT(memberId)|
+---------+-----+---------------+
|712903230| 350 |       4       |
+---------+-----+---------------+
Peter Badida
  • 11,310
  • 10
  • 44
  • 90
  • i am using riak time series,,,,,,join is also not working , if any idea about this then mail me shahzad@canbrand.in – Shahzad Hussain Nov 11 '16 at 12:44
  • Hi Shahzad, Riak TS doesn't have joins so using join isn't going to work. I would also note that one of the points of StackOverflow is to share knowledge so emailing you the answer to your questions would be counter to the spirit of Stack. – Craig Nov 11 '16 at 13:46
  • Shahzad, as a follow up, can you please post your table schema? I attempted to recreate using the following schema: CREATE TABLE Emp18 ( memberid SINT64 NOT NULL, start TIMESTAMP NOT NULL, end TIMESTAMP NOT NULL, steps SINT64, PRIMARY KEY ( ( QUANTUM(start, 300, 'd') ), start, memberid ) ); I didn't get an error when running the query with GROUP BY. – Craig Nov 11 '16 at 14:34
  • i am still not getting output by using either order by or group by.......need explanation,,,,,, – Shahzad Hussain Nov 29 '16 at 05:20
  • by using order by my query is : select memberId,type,model,imei,deviceId,manufacturer,os,version,time from devicedetail where memberId=107 order by time desc limit 1; And My Table is like:- CREATE TABLE devicedetail (memberId SINT64 NOT NULL, type VARCHAR NOT NULL,model VARCHAR NOT NULL,imei VARCHAR NOT NULL,deviceId VARCHAR NOT NULL,manufacturer VARCHAR NOT NULL,os VARCHAR NOT NULL,version VARCHAR NOT NULL,time TIMESTAMP NOT NULL,PRIMARY KEY ((memberId),memberId)); – Shahzad Hussain Nov 29 '16 at 05:22
  • Hi Shahzad, in your new query above you have added SQL sytax that is not supported by Riak TS: ORDER BY and LIMIT. I think you need to carefully review the documents at http://docs.basho.com/riak/ts/ to understand what Riak TS's current features and capabilities are. – Craig Nov 29 '16 at 16:55

0 Answers0