Publicidad

Advanced SAS: SAS SQL

24 de Mar de 2023
Publicidad

Más contenido relacionado

Publicidad

Advanced SAS: SAS SQL

  1. SAS SQL Handson School of Data Science www.handsonsystem.com 1
  2. SAS SQL Lesson 1. SELECT statement Lesson 2. WHERE clause Lesson 3. GROUP BY clause Lesson 4. ORDER BY clause Lesson 5. JOIN clause www.handsonsystem.com 2
  3. SELECT statement: proc sql; select * from mytable; quit; SAS SQL The SELECT statement is used to retrieve data from one or more tables. Example: www.handsonsystem.com 3
  4. WHERE clause The WHERE clause is used to filter rows based on a condition. proc sql; select * from mytable where Sub = “Statistics” and Score gt 70 ; quit; SAS SQL www.handsonsystem.com 4
  5. GROUP BY clause The GROUP BY clause is used to group rows based on one or more columns. proc sql; select dept, avg(salary) from mytable group by dept; quit; SAS SQL www.handsonsystem.com 5
  6. ORDER BY clause The ORDER BY clause is used to sort the result set based on one or more columns. proc sql; select * from mytable order by id; quit; SAS SQL www.handsonsystem.com 6
  7. JOIN clause The JOIN clause is used to combine data from two or more tables based on a common column. proc sql; select * from table1 inner join table2 on table1.id = table2.id; quit; SAS SQL www.handsonsystem.com 7
  8. THANK YOU Handson School of Data Science www.handsonsystem.com www.handsonsystem.com 8
Publicidad