2。
a) select customer_id,c_name,c_number from (
select a.col1 customer_id,a.col2 c_name,a.col3 c_number,
ROW_NUMBER() OVER (ORDER BY a.col3 ) AS c_row_num1,
ROW_NUMBER() OVER (ORDER BY b.col3 ) AS c_row_num2
from table a
inner join table b on
a.col1=b.col1)
where c_row_num1>5 and c_row_num2>5
b)
select customer_id,c_name,c_number from (
select a.col1 customer_id,a.col2 c_name,a.col3 c_number,
from table a
inner join table b on
a.col1=b.col1)
where a.col3 is null and b.col3 is null
c)
select customer_id,c_name,c_number from (
select a.col1 customer_id,a.col2 c_name,a.col3 c_number,
from table a
inner join table b on
a.col1=b.col1)
where a.col3=b.col3
我希望您已经理解我的查询。我已经为您的问题陈述提供了逻辑。