# 6 Find all New York and New Jersey students Display student ID, la

Content type
User Generated
Rating
Showing Page:
1/2
6. Find all New York and New Jersey students. Display
student ID, last name, first name, and state. 7. For each
course ID, display the maximum count in descending
order. 8. Display all instructors and how many sections
they teach. 9. Show the total enrollment for course CIS253
in a column named TOTAL ENROLLED. 10. Display course
title, total capacity and number of sections in each course,
where there is more than 1 section. 11. Create a view
CSinstructors, showing all information about instructors
from the Computer Science department. 12. Find students
who are born in the month of October.
Solution
let us assume the table name as COLLEGE
6. SELECT student_id,last_name,first_name,state from
COLLEGE WHERE (state=\'New York\' OR state=\'New
Jersey\');
7. SELECT course_id,MAX(maxcount) AS MaximumCount
from COLLEGE GROUP BY course_id ORDER BY
MaximumCount desc;
8. SELECT instructors,COUNT(course_id) from COLLEGE;
9. SELECT COUNT(student_id) from COLLEGE WHERE
course_id=\'CIS253\';
10. SELECT title,total_students,no_sections from

Showing Page:
2/2

Unformatted Attachment Preview
6. Find all New York and New Jersey students. Display student ID, last name, first name, and state. 7. For each course ID, display the maximum count in descending order. 8. Display all instructors and how many sections they teach. 9. Show the total enrollment for course CIS253 in a column named TOTAL ENROLLED. 10. Display course title, total capacity and number of sections in each course, where there is more than 1 section. 11. Create a view CSinstructors, showing all information about instructors from the Computer Science department. 12. Find students who are born in the month of October. So ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

### Review

Anonymous
I was having a hard time with this subject, and this was a great help.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4