[Sequoia database Sequoiadb] [consultation] [built] SQL error -195 when an exec command to query function substr

[Problem Description]
Run sdb being given "db.exec ( 'select substr (pad , 1,2) as sss, count (id) as count from sysbench_test.sbtest1 group by substr (pad, 1,2)')" , the error message is as follows:
(SDBBP): 1 Uncaught Exception: -195
SQL syntax error
[solution]
is currently built-in SQL syntax does not support such functions, only support function associated with aggregation. Built-in SQL function is not comprehensive enough, it is generally recommended to use SQL engine (MySQL / PostgreSQL), but the standard SQL statements in support of the json operation is relatively weak. It is therefore recommended direct use of syntax native to operate. Specific reference character update s in b s t r h t t p : / / d o c . s e q u o i a d b . c o m / c n / i n d e x c a t i d 1440656863 e d i t i o n i d 302 S Q L s u m ( ) c o u n t ( ) a v g ( ) m a x ( ) m i n ( ) f i r s t ( ) l a s t ( ) p u s h ( ) a d d t o s e t ( ) b u i l d o b j ( ) m e r g e a r r a y s e t ( ) s u b s t r S Q L S Q L M y S Q L / P o s t g r e S Q L S Q L j s o n 使 substr: http://doc.sequoiadb.com/cn/index-cat_id-1440656863-edition_id-302 [solution] currently only supports built-in SQL syntax sum (), count (), avg (), max (), min (), first (), last (), push (), addtoset (), buildobj (), mergearrayset () function, etc., do not support the substr function. Due to the built-in SQL function is not comprehensive enough, it is generally recommended to use SQL engine (MySQL / PostgreSQL), but the standard SQL statements in support of the json operation is relatively weak. It is therefore recommended direct use of syntax native to operate, native syntax substr command: db.cs.cl.find ({}, {a2]}})
with particular reference character update substr $:http://doc.sequoiadb.com/cn/index-cat_id-1440656863-edition_id-302

Guess you like

Origin blog.csdn.net/Kamani_msd/article/details/93972813