select id, animal
from t1
qualify row_number() over (partition by id order by 1) = 1
This is not real random, to get a truly random result you need:
select id, animal
,rnd -- without rnd the optimizer removes the Derived Table and throws an error:
-- [5521] The RANDOM function can not be used in Aggregates or Ordered Analytical Functions.
from
( select id, animal,
random(1,100) as rnd
from t1
) as dt
qualify row_number() over (partition by id order by rnd) = 1