简体   繁体   中英

cube.js: subquery in FROM clause

How to do a subquery in the FROM clause in cube.js. There is only one table.

SELECT col_a FROM 
       (SELECT col_a, col_b FROM table_name WHERE col_c=some_val ORDER BY time DESC) 
WHERE col_b=some_other_value

if you are in the same Table you could define a cube.js segment in your schema then specify the segment you are querying in your JSON Query. Refer this page to in the Docs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM