将查询结果表示为新的 Table
Represent Query Results as new Table
目前我很难构建正确的查询我有两个查询
查询 1.
SELECT $TOTAL
LET $CORE = (SELECT FROM SOMETHING_1 WHERE SOMECONDITION_1),
$SOURCE= (SELECT FROM SOMETHING_2 WHERE SOMECONDITION_2),
$TOTAL = UNIONALL($CORE.A , $CORE.B ,$SOURCE.C)
结果我收到:
[A1, A2, B1, B2,C1, C2]
查询 2.
SELECT $CORE.A , $CORE.B ,$SOURCE.C
LET $CORE = (SELECT FROM SOMETHING_1 WHERE SOMECONDITION_1),
$SOURCE= (SELECT FROM SOMETHING_2 WHERE SOMECONDITION_2)
结果我收到
**[A1, A2 ],[ B1 , B2] ,[C1 , C2]**
如果我想收到以下结果,我应该使用哪个查询:
[A1, B1 , C1 ],[ A2 , B2 , C2]
提前致谢
试试这个:
select expand($c)
LET $a = (select creationTime, modificationTime from SOMETHING_1 where SOMECONDITION_1),
$b = (select columns_mail from SOMETHING_2 where SOMECONDITION_2),
$c = unionall($a,$b)
这是我得到的:
希望对您有所帮助
此致
目前我很难构建正确的查询我有两个查询
查询 1.
SELECT $TOTAL
LET $CORE = (SELECT FROM SOMETHING_1 WHERE SOMECONDITION_1),
$SOURCE= (SELECT FROM SOMETHING_2 WHERE SOMECONDITION_2),
$TOTAL = UNIONALL($CORE.A , $CORE.B ,$SOURCE.C)
结果我收到: [A1, A2, B1, B2,C1, C2]
查询 2.
SELECT $CORE.A , $CORE.B ,$SOURCE.C
LET $CORE = (SELECT FROM SOMETHING_1 WHERE SOMECONDITION_1),
$SOURCE= (SELECT FROM SOMETHING_2 WHERE SOMECONDITION_2)
结果我收到
**[A1, A2 ],[ B1 , B2] ,[C1 , C2]**
如果我想收到以下结果,我应该使用哪个查询:
[A1, B1 , C1 ],[ A2 , B2 , C2]
提前致谢
试试这个:
select expand($c)
LET $a = (select creationTime, modificationTime from SOMETHING_1 where SOMECONDITION_1),
$b = (select columns_mail from SOMETHING_2 where SOMECONDITION_2),
$c = unionall($a,$b)
这是我得到的:
希望对您有所帮助
此致