ITM 500 Lecture 4: ITM500 Week 4
Document Summary
15 quesions from lab (5 from each lab) Ex1: list the average gpa for students by major (i. e. for each major) Select avg(stdgpa) as average gpa", stdmajor from student. Sill include the group by" ield in the select list even though not explicitly requested (always do unless otherwise instructed) Ex 1a: sequence the aggregates by highest to lowest average. Select avg(stdgpa) as average gpa , stdmajor from student. The only ields allowed in the select list are used by the iincion (ex. Avg(facsalary) or are in the group by clause (ex. Ex 2: list the average for each major (but only display averages about 3. 0) Ex2b: as per ex 2 but only for students )while ssn starts with 1 or ends with 4 . Select avg(stdgpa) as average gpa , stdmajor from students. Where stdssn like 1%" or stdssn like %4".