+ 1

Help please

1) A new animal has come in, with the following details: name - "Slim", type - "Giraffe", country_id - 1 Add him to the Animals table. 2) You want to make a complete list of the animals for the zoo’s visitors. Write a query to output a new table with each animal's name, type and country fields, sorted by countries.

22nd Feb 2022, 11:12 AM
Ibrahim Youssef Ibrahim
Ibrahim Youssef Ibrahim - avatar
4 Answers
+ 1
Can you write or link the tables details?
22nd Feb 2022, 12:45 PM
Domonkos Gyömörey
Domonkos Gyömörey - avatar
+ 1
INSERT INTO Animals (name, type, country_id) VALUES ("Slim", "Giraffe", 1); SELECT name, type, country FROM Animals INNER JOIN Countries ON country_id = Countries.id ORDER BY countri;
22nd Feb 2022, 2:03 PM
Domonkos Gyömörey
Domonkos Gyömörey - avatar
+ 1
Thanks
22nd Feb 2022, 2:11 PM
Ibrahim Youssef Ibrahim
Ibrahim Youssef Ibrahim - avatar