Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Implementation in MySQL Language Please Submit it As soon as possible A university has started a student-advisor plan which assigns a professor as an advisor
Implementation in MySQL Language
Please Submit it As soon as possible
A university has started a student-advisor plan which assigns a professor as an advisor to each student for academic guidance. Write a query to find the roll number and names of students who either have a male advisor with a salary of more than 15,000 or a female advisor with a salary of more than 20,000. There are two tables in the database: student_information and faculty_information. The primary key of student_information is roll_number whereas that of faculty_information is employee_ID. Schema You are provided 2 tables: student information, faculty_information. student information Name Type Description roll_number INTEGER The roll number of the student. This is the primary key. name STRING The name of the student. advisor INTEGER The employee ID of the advisor of the student. faculty_information Name Type Description employee_ID INTEGER The employee ID of the professor. This is the primary key. gender CHAR The gender of the professor (M for male and F for female). salary INTEGER The salary of the professor. Note: Information about any professor who acts as an advisor to a student is always present in faculty_information. Sample Data Tables student_information roll_number name advisor 1 Robert 2 2 Claire 1 3 Kimmy 2 faculty information employee_id gender salary 1 M 21000 2 F 18000 Sample Output 2 Claire Explanation Student with roll number 2 is advised by a male teacher with a salary of 21,000 which is more than 15,000 and hence is displayed in the output. Students 1 and 3 are advised by a female teacher whose salary is less than 20,000 and hence are not present in the outputStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started