I have tables like this and I expect the result as shown below.
I tried this query
select row_number () over (order by level), table2.Level as Level, table2.Organization as Organization, max(nation) as nation from table2
left join table1 on table1.Level = table2.level and table1.organization = table2.organization
group by table2.level, table2.organization
order by nation, Level, Organization
But it doesn't produce the serial number in series.