Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi! I need help use nested query here's the tables table for pet table for owner this is the question: 1. Find the eldest female

Hi! I need help use nested query here's the tables

table for pet

image text in transcribed table for owner

image text in transcribed

this is the question:

1. Find the eldest female dog. Show the gender, type, and age.

2. Find the eldest male cat who is active. Show the gender, type, breed, date added, and age.

3. Show active dogs whose age is between 5 and 10.

4. Project all pets whose status are lost EXCEPT cats and dogs

5. Show how many male and female pets who/which are Fish.

| pet_id owner_id pet_name | pet_age pet_gender | pet_price pet_color pet_type pet_breed | pet_status date added blue orange red blue orange Dirty Black Diana brown Dirty Black WY blue w red iwWVANU BUDOUNE Anjun Christ Dianne am 21 Roldan 2 13 April 24 Shedi Shed 29 19 Rhunick un Rhunick 19 Nunc 16 Louie 15 in Nepthalie 14 Jairah Jairan Sigrid Yvonne Melanie Philip 12 Michael 23 Jeff 1201 3 Lauri Gabriel 15 Floro 5910 1 Tahir 21 Krizia Angelou 4 . 1 Gem 4 jim 1 | Kenneth 2 | Jr . Brown dog Fish Dog Fish cat - Fish Dog dog Fish Dog dog Spider Spider P. pia Dog Fish Fish dog Fish cat 1221.34 2342.23 1345.13 "73.13 435.1A 13.10 5435.10 *33.10 5435.10 *33.10 5435.10 *33.10 1435.10 1*32.10 1435.10 *33.10 435.10 02:20 -02:10 785.10 7385.10 Co3.10 5325.10 322-10 8325.10 23.10 825.10 23.10 85.10 - 185.10 -02:10 585.10 03.10 55.10 10 135.10 132.10 235.10 2:10 152.10 14 23215.10 413.10 3215.10 565.10 3215.10 215.10 1215.15 ara 15.10 aria 4515.10 2074 987.10 10071 1987.10 Sky Green blue Sky Green Black wa blue white blue blue au red brown blue vu blue Due 1001 1002 1003 20 1004 2007 1005 1003 1006 200 1007 100 1008 20 1010 20 1011 1040 1012 2015 1013 20 1014 2017 1015 2013 1016 104 1017 20 1018 2012 1019 2012 1020 1024 1022 2005 1023 100 1024 100 1025 24 1026 1260 1027 1028 1029 1030 4054 1021 2. 1031 1032 40 1033 404 1034 23 1035 1036 - 1037 23 1038 100 1039 o 1040 101 1041 20 1042 207 1043 * 1044 20 1045 * 1046 40 1946 1917 1047 1048 1049 1050 13 Male 12 Male 18 Male 28 Male 28 race Female ana 58 Female 58 Silla Male race 12 Female 15 ana 12 Female - 8 Undeci ore Male 15 u Male hane 25 Male 5 . Female 5 ma 3 Male na 6 Male - 13 Transg 23 Male no 3 Male rate 2 Female ma Male na 4 Male no 3 Male ha 6 Male na 32 Male 6 Female 7 | Male 5 | Female 12 Female 5 TM Female 15 Male TO 25 Female ma 5 Female 4 Male DIM 12 A Male a 34 Male 23 | Male a 3 Male 342 No Male 344 Nu Male 4 43 Female 23 Female S. 21 | Male I 23 | Male IN 3 | Male 3 Mal 3 Male 4 | Female 12 | Male 12 NULL 16 NULL Dachshund Guppy Beagle Guppy Persian sesta Janitor Labrador he Siberian Husky -- Black Mole DAR Askal la Siberian Husky BISS. Black Widows back Camel came Siberian Husky Gold Fish 4.- Gold Fish 14 is Siberian Husky Cat Fish ras" Siamese Labrador Surau Rottweiler La Dachshund Dan Poodle s erslan Persian Dachshund Persian Dachshund Dachshund Pirit Dann Bengal Black Widows DU Bull Frog A. Eagle Ragdoll Poodle CH Siamese Drake Great Serpent Achal Rottweiler Active Inactive Active ve Inactive Track Accave Active Active ACHE Active e Active ACV Active ALI deceased deceas Active Acave Active ACLE Active ACLE Active ACHE Active ACHE Active Active ACHE Active Ave deceased accas Active Allave Active ACHE Active ACLE Active A Active ACLE Accave Active Active Active Active utius Active Active I Active Active Actiu Active I Active a Active Active Active Dog Dog dog Dog cat dog dog cat Lolivy brown 2018-04-26 21:40:50 2018-04-26 21:40:50 2018-04-26 21:40:50 2010-01-40 41-10.30 2018-04-26 21:40:50 2010-01-20 21-10-20 2018-04-26 21:40:50 120*40 41:10.30 2018-04-26 21:40:50 2010-01-20 21:10:30 2018-04-26 21:40:50 2010-01-40 41-10-30 2018-04-26 21:40:50 12:33:10: 2018-04-26 21:40:50 101020 21.10.30 2018-04-26 21:40:50 2010-01-40 41-703 2018-04-26 21:40:50 2010-01-40 41-703 2018-04-26 21:40:50 2010-01-40 41-703 2018-04-26 21:40:50 2010-01-40 41-703 2018-04-26 21:40:50 12:33:10: 2018-04-26 21:40:50 12:33:10: 2018-04-26 21:40:50 12:33:10: 2018-04-26 21:40:50 12:33:10: 2018-04-26 21:40:50 12:33:10: 2018-04-26 21:40:50 2010-01-40 41-703 2018-04-26 21:40:50 2010-01-40 41-703 2018-04-26 21:40:50 2010-01-40 41-10-30 2018-04-26 21:40:50 2010-01-40 41-703 2018-04-26 21:40:50 1010 5:40. 2018-04-26 21:40:50 2010-01-20 21-10-20 2018-04-26 21:40:50 2018-04-26 21:40:50 2018-04-26 21:40:50 2018-04-26 21:40:50 1240 24.1.CA 104034 2018-04-26 21:40:50 2018-04-26 21:40:50 1040 3.2.CA 2018-04-26 21:40:50 1040 6.4.ca 2018-04-26 21:40:50 1040 6.4.ca 2018-04-26 21:40:50 1010 011.ca 2018-04-26 21:40:50 1040 3.2.c 2018-04-26 21:40:50 1010 011.ca 2018-04-26 21:40:50 1010 011.ca 2018-04-26 21:40:50 2010 6.4.ca 2018-04-26 21:40:50 1010 011.ca 2018-04-26 21:40:50 2010 6.4.ca 2018-04-26 21:40:50 2010 6.4.ca 2018-04-26 21:40:50 3210 36 3.4.ca 2018-04-26 21:40:50 3210 36 3.4.ca 2018-04-26 21:40:50 1010 011.ca 2018-04-26 21:40:50 1010 011.ca 2018-04-26 21:40:50 3210 x 36 3:40.ca 2018-04-26 21:40:50 2018-04-26 21:40:50 2018-04-26 21:40:50 2018-04-26 21:40:50 2018-04-26 21:40:50 Cat dog Fish blue blue Rainbow Gray blue blue brown rom pink blue od red blue blue Lloyd 13 | Francis Alfred cat Spider Rottweiler 1 | Biano 1987.12 3987.10 Bird 18 Cyril karding Black Dog 8 Frog wat cat Dog 9 cat Dragon Das Dragon ve 2 ETB1 5 | Billy 1 ., 7 19 martzl 1 and 1 dasd dd 14 ddsa 1 sdfs Erdi fsdfs 1 1 ffds . 1 da 18 baste ho 10 w 18 kyle ni. 1 Chris 1L 1 Evans 4 deceased Bird 2013 3123.34 40 21.00 43423.00 Si W.00 34.00 4242.00 56.00 534.00 2342.00 To 500.00 car 4535.00 34 342.00 342.00 23432. .00 23231.90 23231.90 5231.90 blue 2 Gray Gray orange w blue auce orange w blue blue Inactive AUTY Active Inactive Inactive Active utius Active 1 Active uti Active Beagle Dog 28 Dog 28 Dog 28 Dog Spider Spider Bird bird bird Crocodile Beagle Daddy Longlegs Chris Black Black Black Daddy Longlegs ostrich Parrot Active 3 | Luphy lost Green Green Chicken 10 | Sandara 11 Liza lost Violet Salt Corcs Borrowed | owner_id | owner_name | owner_age | owner_gender | owner_address | owner_civilstatus | 1 | Anna 2 Kyle 3 John 4 | Juan 5 Fatima 6 Celeste 7 Francis 8 | Jave 9 | Jeffrey 10 Vince 11 Eugene 12 Rona 13 Thelmo 14 Connie 15 Mart 16 Mart 17 Melyn 18 | Botchoy 19 Chester 21 Paul 22 Frank 23 Frank 24 | Mel 25 Justin 26 | Shane 27 April 28 Mary Marky 30 Raphy 15 Male 21 | Female 22 Male 15 Female 22 | Female 26 | Male 15 | Male 34 | Male 57 | Female 13 | Female 16 Male 33 | Female 20 Male 12 | Female 16 | Male 21 Male 24 | Male 50 | Female 29 Male 29 | Female 39 | Female 93 | Female 99 Male 100 | Female 10 | Male 12 Male 18 | Male 85 | Male 22 | Female | Puan Matina Matina Matina Matina Bankerohan Obrero Bajada bankerohan Obrero Buhangin Toril Toril Bankerohan Bajada Bajada Bajada Boulevard Buhangin Buhangin Buhangin Blvd Maa Maa Maa | single single Deceased married married Married Deceased Married Married Divorce single Divorce Widowed Widowed single single single single single single single single single Married Married Married Married Widowed single Maa Ma-a 29 Gravahan Alaska

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

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago