Given this query snowflake returns a result set of 2, arbitrarily resolving y to the table T,
select y
from (select 1 x, 2 y) T
join (select 1 x, 3 y) T1 using (x)
while at the same time returning an ambiguous column error when using a qualified join instead:
select y
from (select 1 x, 2 y) T
join (select 1 x, 3 y) T1 on T.x = T1.x
What's the set of rules that determine whether a column reference is ambiguous in Snowflake SQL? Postgres considers both of these queries ambiguous.

