I think you almost figured it out.
Try this one :
select * from table_name qualify row_number() over (partition by address order by null) = 1;
qualify is a supplementary level of filter applied after window functions (like row_number).
the row_number is reseting for every new value of the partition by columns and expressions.
the order by null thus makes your query non-deterministic, which mean running it multiple times will yield in different outputs, which usually is something we don't want.
Yes, this is due to the non-deterministic related to the order by null in the row_number.
I'm not familiar with SAS, so I'll go for a guess. Try this one :
select * from table_name qualify row_number() over (partition by address order by col1, col2, col3, col4, col5, col6) = 1;
Can you publish some of the data in your base table and after ordered in SAS?
You can anonimize what needed as long as you keep the logic.
There is an important concept in relational databases you need to understand, data are not sorted.
See tables like a bag of marbles. You can put things in any order you want, once in the bag you can't know which one you put first.
If I do insert into my table values ('A') then insert into my table values ('B'), you can never say A is the first value and B the second.
What you can do is add a column that will allow you to sort your table.
To sum it up, there is no row order unless you specify something.
SAS has to make a choice somewhere to choose one row over the others.