Question 20
Table Name: College
Relevant Table: College(Professor (Text), Department (text), Salary (INT))
Professor | Department | Salary |
John | Computer Science | 60,000 |
Van der | Mechanical Engineering | 57,500 |
Ackerman | Physics | 45,000 |
Suyash | Mathematics | 52,000 |
Simrit | Computer Science | 56,500 |
Jessica | Computer Science | 55,000 |
Jenny | Personality Development | 50,000 |
QUERY: Write a query that returns all the professors who either work in the "computer science" department or make more than 50,000.
Execute: SELECT Professor, Department, Salary
FROM College
WHERE Department = 'Computer Science' OR Salary > 50000;
Answer:
Professor | Department | Salary |
John | Computer Science | 60,000 |
Van der | Mechanical Engineering | 57,500 |
Suyash | Mathematics | 52,000 |
Simrit | Computer Science | 56,500 |
Jessica | Computer Science | 55,000 |