Workshop: SQL Complex Retrieval and Aggregate Operations
The following exercises pertain to the COURSE and FACULTY tables. The FACULTY table has the following columns: FNO, FNAME, FADDR, FHIRE_DATE, FNUM_DEP, FSALARY, and FDEPT. The COURSE table has the following columns: CNO, CNAME, CDESCP, CLABFEE, CRED, and CDEPT. Both tables are owned by the user STUDENT.
1.For each department offering courses, display the name of the department and the number of courses offered by the department. The output should list the courses in alphabetic order.
2.Consider only three-credit courses. Display the name of the department and total lab fee for all courses offered by each department only if the total lab fee is less than or equal to $150.
3.Do not consider courses with a lab fee over $400. Display the name of the department and the maximum lab fee charged by the department only if that maximum exceeds $175.
4.Consider only faculty whose salary exceeds $35000.00. For each department which has such a faculty member, display the name of the department followed by the total amount paid to these members. Sort the result by total salary amounts.
1. SELECT CNAME, CNO FROM COURSE ORDER BY CNAME ASC;
2. SELECT CDEPT, CLABFEE FROM COURSE WHERE CLABFEE =< 150 AND CRED=3;
3. SELECT CDEPT, CLABFEE FROM COURSE WHERE MAX( CLABFEE ) >75 AND CLABFEE=400;
4.SELECT FDEPT, SUM( FSALARY ) FROM FACULTY WHERE FSALARY> 35000.00 ORDER BY FSALARY ASC;
Workshop: SQL Complex Retrieval and Aggregate Operations The following exercises pertain to the COURSE and FACULTY...
Please write ONE SQL statement for each of the following tasks using the below tables. Note that you can only use conditions specified in the task description and cannot manually look up data and add conditions. Task 1: return title of textbooks with price over $100. Task 2: return number of courses sections scheduled for each year and semester. Please return year, semester, and number of courses. Task 3: Return names of all courses in Information Systems undergraduate program. Task...
Use only a single SQL statement for each of the following questions 1 Give a listing of all the ssns,first names and the class descriptions of all the classes the students are taking. If there are no class _descriptions display 'No description is available yet'. (USE NVL) 2 Give a listing of only the lname and the class_code for students who are taking 'Introduction to C programming'. (Inner join) 3 Give a lising of all the class_descriptions and the number...
Budgeting for an Academic Department at a State University: Can You Believe the Numbers? INTRODUCTION You are the senior accounting faculty member in the business school and your dean, Dean Weller, is asking for help. She is very discouraged after a midyear budget meeting with the Vice President of Finance. The college's Department of Social Work has a large budget deficit, and because of this the VP is inclined towards closing the department entirely or closing its bachelor's program. The...