create table t (id char, cal1 int);
insert into t values ('a', 1), ('b', 0),('a', 2),('c', 1),('a', 3);
SELECT top 2 MIN(id) id FROM t GROUP by id ORDER BY NEWID();
select * from t where id in (
SELECT top 2 MIN(id) id FROM t GROUP by id ORDER BY NEWID()
);