Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer each part of the question Thank you! The veterinarians want the information for appointments scheduled between October 19 th and October 30. a.

Please answer each part of the question Thank you!
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
The veterinarians want the information for appointments scheduled between October 19 th and October 30. a. SELECT PET_NAME. OWNER_LNAME, APPOINTMENT_REASON. APPOINTMENT_DATE FROM Owner. Pet, Appointments WHERE OWner.OWNER ID = PEL OWNER ID AND Pet_PET_ID = Appointments.PET_ID AND APPOINTMENT_DATE BETWEEN '2019-10-19' AND '2019-10-30' b. SELECT PET_NAME, OWNER_LNAME, APPOINTMENT_REASON. APPOINTMENT_DATE FROM OWner, Pet. Appointments WHERE OWner.OWNER ID = PEL.OWNER_ID AND Pet.PET_ID = Appointments.PET_ID AND APPOINTMENT_DATE =2 '2019-10-19' AND APPOINTMENT_DATE =20191030 ' C. SELECT PET_NAME, OWNER_LNAME, APPOINTMENT_REASON, APPOINTMENT_DATE FROM Owner. Pet, Appointments WHERE OWNER.OWNER ID = PEL.OWNER 10 AND Pet.PE_ _ID = Appointments.PET_ID AND APPOINTMENT_DATE IS BETWEEN 2019-10-19' AND '2019-10-30' 3. The veterinarians want to sort the pets by species and group them by Owner. Use appropriate column aliases. a. SELECT PET_ID AS ID, SPECIES, PET_BREED AS BREED, PET_NAME AS NAME, OWNER_ID FROM PET ORDER BY SPECIES, OWNER_ID GROUP BY OWNER ID: b. SELECT PET_ID AS ID, SPECIES, PET_BREED AS BREED, PET_NAME AS NAME, OWNER_ID FROM PET GROUP BY SPECIES, OWNER_ID ORDER BY OWNER_ID: 4. The veterinarians want to know all appointments only with cats or dogs. a. SELECT PET_NAME, SPECIES, PET_BREED, APPOINTMENT_DATE. APPOINTMENT_REASON FROM Pet JOIN Appointments ON Appointments.PET_ID = Pet.PET_IO WHERE SPECIES ='Cat' OR SPECIES = 'DOg: b. SELECTPET_NAME, SPECIES, PET_BREED, APPOINTMENT_DATE, APPOINTMENT REASON FROM Pet joIN Appointments ON Appointments.PET_ID = Pet_PET_ID WHERE SPECIES IS 'Cat' OR 'Bird": c. SELECT PET_NAME, SPECIES. PET_BREED, APPOINTMENT_DATE. APPOINTMENT_REASON FROM Pet joIN Appointments ON Appointments.PET _ID = Pet.PET ID. WHERE SPECIES = 'Cat' AND SPECIES = DOg': 1. The veterinarians want to know the total for the invoices that have been paid. a. SELECT SUM(INVOICE) FROM APPOINTMENTS; b. SELECT SUM(INVOICE) FROM APPOINTMENTS WHERE PAID =; c. SELECT SUM(INVOICE) FROM APPOINTMENTS WHERE PAID = 'N

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Project Management The Managerial Process

Authors: Erik Larson, Clifford Gray

6th edition

1259186407, 978-0078096594, 78096596, 978-1259186400

More Books

Students also viewed these General Management questions