+ 1
Is there a problem with sql zoo?
No output for anything.
6 Answers
+ 2
/* name - "Slim", type - "Giraffe", country_id - 1 */
INSERT INTO Animals(name, type,country_id)
VALUES('Slim','Giraffe',1);
SELECT Animals.name, Animals.type, Countries.country
FROM Animals
INNER JOIN Countries
ON Animals.country_id = Countries.id
ORDER BY Countries.country;
This will help you
+ 1
Ah ok, thank you!
0
Oyoleo
Show your query.
0
INSERT INTO Animals (name, type, country_id) VALUES ('Slim', 'Giraffe', 1);
SELECT Animals.name, Animals.type, Countries.country FROM Animals INNER JOIN Countries ON Animals.country_id=Countries.id
ORDER BY Countries.country;
Thanks.
0
Oyoleo
There should be ( ) in insert query and ORDER BY Countries.country_id DESC
-------
INSERT INTO Animals (name, type, country_id) VALUES ('Slim', 'Giraffe', 1);
SELECT Animals.name, Animals.type, Countries.country FROM Animals INNER JOIN Countries ON Animals.country_id=Countries.id
ORDER BY Animals.country_id DESC;
But there is problem in Sololearn SQL compiler which doesn't show output.
0
It keeps saying that "column 'Slim' does not exist", but "Slim" isn't even a column.



