Answered step by step
Verified Expert Solution
Question
1 Approved Answer
10 and 11 didn't run. Tried to run it on Live SQL but it says no data found. I changed one of the 'AND' functions
10 and 11 didn't run. Tried to run it on Live SQL but it says no data found. I changed one of the 'AND' functions to "OR" but it gave table with more than 50 rows.
AT&T RI 41 ..d 97% 9:42 AM Answer 1 of 1 city "Brea" Query: SELECT S.sFName, S.SLName FROM Staff S, Clinic C WHERE S.clinicNo C.clinicNo AND C.CITY "Brea"; 9. List the name (first and last) of every owner who owns "Chihuahua" Query: SELECT PO.oFName, PO.oLName FROM PetOwner PO, Pet P WHERE PO.ownerNo PownerNo AND P.petName -"Chihuahua"; 10. List the name of every owner who owns a pet that has visited a clinic located in the city Fullerton Query: SELECT PO.oFName, PO.oLName, C.city "Visited Clinic" FROM Petowner PO, Pet P Clinic C WHERE PO.ownerNo-P.ownerNo AND .clinicNo-PO.clinicNo AND C.city- Fullerton' 11. List the name and type of pet for every pet that has been treated more than 2 days and spent more than $100 for treatment Query: SELECT PpetName, PpetType FROM Pet P Treatment T, PetTreatment PT, Examination E WHERE P.examNo E.examNo AND E.examNo = PT.examNo AND PT.treatNo-T.treatNo AND T.cost 100 AND (endDate startDate) >2; 12. List the staff's first name and last name for all staffs who are managers but do not manage any clinic (e.g., the position is manager) Query: SELECT sFName, sLName FROM Staff where position "manager" OR NOT EXISTS (SELECT clinicNo FROM Staff)
Step 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