Hi @Julie4435637
Check out this paper if you want to see SQL implementation for first. & last. Advanced Programming Techniques with PROC SQL
If you are trying to apply the SQL to a third party Relational Database such as Teradata/Oracle to name few, you may need to check this paper
Your Database Can Do SAS® Too!
Hope this helps,
Ahmed
... View more