
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
# For this assignment, use the university database
use university;
# This assignment involves more than one table.
# It would be very helpful to review the content in each table so you know how they are related.
select * from instructor;
select * from teaches;
select * from course;
select * from department;
select * from student;
select * from takes;
# Write SQL statement to complete the following tasks
# 1. Find the lowest salary of any instructor
# 2. Find the names of all instructors earning the lowest salary (there may be more than one with the same salary).
# 3. Find all instructors whose salary information is not null
# 4. List the instructor names and the course title that an instructor has taught.
# Remove duplicate. Sort by instructor name alphabetically.
# Hint: you need the data from three tables: instructor, teaches, course. Expect 14 rows.
# 5. Using the IN keyword, list all course titles that are taught by Mozart and Srinivasan.
# Hint: you need the data from three tables: instructor, teaches, course. Expect 4 rows.
# 6. For each department, find the maximum salary of instructors in that department.
# You may assume that every department has at least one instructor.
# 7. Find the lowest, across all departments, of the per-department maximum salary computed by the preceding query.
# Give the resulting column a meaningful name, like "lowest_dept_cap".
# Hint: MySQL asks each derived table to have its own alias. That is, you need to give alias to subqueries.
# 8. Write an SQL query to find the names and budgets of those departments
# whose budget is higher than that of Music. List them by budget from lowest to highest.
# Hint: department budget is stored in department table, expect 4 rows.
# 9. Find the number of department that is located in any building.
# In result list only building names and the number of department in that bulding.
# Hint: query the department table. Expect 4 rows
# 10. Based on previous query, list only buildings that have at least 2 departments in it
# 11. For each student who has taken a course at least twice,
# show the student's ID and the course ID.
# Hint: use takes table, think first how you can list how many times a student has taken a course
SAVE
AI-Generated Solution
info
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
Unlock instant AI solutions
Tap the button
to generate a solution
to generate a solution
Click the button to generate
a solution
a solution
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- help with sql class 1. Report the names of the professors who work on 'project01'. 2. Report the names of the students who do not have a supervisor.arrow_forwardThank you for helping! Write the SQL code to produce the total number of hours and charges for each of the projects represented in the ASSIGNMENT table. The result is shown as below. Write the SQL code to display the information of employees who are working as either programmer or system analyst. Write the SQL code to produce job_descriptions(job_title) of employees who are working at project ‘Evergreen’.arrow_forwardAnswer the following SQL questions using MySQL command language in MySQL Workbench, sakila database environment!arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education