1. Using the table information above, write a SQL statement that will return onl
ID: 3737378 • Letter: 1
Question
1. Using the table information above, write a SQL statement that will return only the following fields:
Animal name, Animal type, Animal breed, Owner name, Owner address (street, city, state, zip)
_________________________________________________________________________________________________________________________________________________
Write a SQL statement that will insert the data above into the Student table with the information listed above
__________________________________________________________________________________________________________________________________________
3. Using the information above, write a SQL statement that will show only female animals that are treated by doctor number 2
_________________________________________________________________________________________________________________________________________
4. Using the information above, write a SQL statement that will count the animals that are treated by doctor number 2.
______________________________________________________________________________________________________________________________________________
5. Using the data above, write a SQL statement that will move animal Alex under the care of doctor number 2.
__________________________________________________________________________________________________________________________________________
6. Write a SQL statement that will create the table listed above.
Table: Animal AnimalID AnimalName AnimalT Piccolo Widget Gizmo Fifi Doodle AnimalBreed AnimalGenderOwner Siamese Siamese JackRussell Male Poodle Amber Doctor 2 2 14 14 Cat Cat Male Male 1 1 52 3 29 Female Female Chicken 14 Table: Owner Address OwnerName Smith Jones Apple OwnerlD 13 14 Table: Address Street 112 Main 456 Pike Ct 555 Center Lane Lakewood State CO CO AddressID Cit Denver Englewood Zi 80236 80111 80255 13Explanation / Answer
Solution:
The first question is done as per Chegg guidelines, please repost others.
1)
SELECT AnimalName, AnimalType, AnimalBreed, OwnerName, Address Street, City, State, Zip)
FROM Animal, Owner, Address.
Using Join:
SELECT AnimalName, AnimalType, AnimalBreed, OwnerName, Address Street, City, State, Zip)
FROM Animal INNER JOIN Owner ON Animal.Owner= Owner .OwnerID INNER JOIN Address ON Owner.Address= Address.AddressID
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.