我很难构建正确的查询,目前我有两个查询
查询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]
提前致谢