Zoo sql | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Zoo sql

Can you help me please! My query to solve the zoo task is: INSERT INTO Animals (name, type, country_id) VALUES ('Slim', 'Giraffe', 1); SELECT animals.name, animals.type, countries.country FROM animals, countries WHERE animals.country_id=countries.id order by animals.country_id desc result: no output

13th Feb 2021, 10:06 AM
Abdelghani
Abdelghani - avatar
3 Answers
+ 1
Thank you
13th Feb 2021, 10:35 AM
Abdelghani
Abdelghani - avatar
+ 1
Here is a code system accepts: /* name - "Slim", type - "Giraffe", country_id - 1 */ INSERT into animals VALUES ('Slim','Giraffe',1); SELECT a.name, a.type, c.country from animals a INNER JOIN Countries c on a.country_id=c.id ORDER by c.country;
26th Apr 2022, 12:34 PM
Ruslan Mustafaev
Ruslan Mustafaev - avatar