select
t1.prof,
t2.project,
coalesce(t1.date, t2.date) date,
t1.amount amount1,
t2.amount amount2
from (
select
t1.*,
row_number() over(partition by date order by prof) rn
from table1 t1
) t1
full join (
select
t2.*,
row_number() over(partition by date order by project) rn
from table2 t2
) t2 on t1.date = t2.date and t1.rn = t2.rn
1条答案
按热度按时间5gfr0r5j1#
您可以使用
row_number()
以及full join
结果是: