如何使用来自同一个表的子查询或连接将以下两个查询连接到一个查询。
select case#
from _CB_Orders
GROUP BY case#
HAVING COUNT (case#) >1;
select Distinct RFMS_Inv_Num, case#
from _CB_Orders
任何帮助..
答案 0 :(得分:0)
这是你想要的吗?
select RFMS_Inv_Num, case#
from _CB_Orders
where RFMS_Inv_Num <> 'AETEST' and
case# in (select case#
from _CB_Orders
GROUP BY case#
HAVING COUNT(case#) > 1
);
有关多次出现的案例的详细信息?
答案 1 :(得分:0)
据我了解,您正尝试按RFMS_Inv_Num
和case#
select RFMS_Inv_Num,case#
from _CB_Orders
GROUP BY RFMS_Inv_Num, case#
HAVING COUNT (*) >1;
如果不是,请编辑您的问题或评论