Unique in SAS implementation of SQL is analogous to DISTINCT, and it does apply to all columns and is required at the beginning of the SELECT statement.
Keyword: UNIQUEContext: [PROC SQL, CREATE TABLE STATEMENT] UNIQUE option [constraint] Specifies that the values of the column must be unique. This constraint is identical to DISTINCT.
A caveat to that is when using in aggregate function such as count:
create table test5 as
select origin, count(distinct make) as count
group by origin;
SAS INNOVATE 2024
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.