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
3 Antworten
+ 4
Currently, there are problems with SQL challenges.
https://www.sololearn.com/Discuss/2695208/why-is-it-showing-no-output
https://www.sololearn.com/Discuss/2695161/no-output-error
https://www.sololearn.com/Discuss/2694959/zoo-project
+ 1
Thank you
+ 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;