Lowest price ever! Learn Generative AI for 48% less!
Get my discount0
SQL INNER JOIN
In problem "ZOO", I wrote these lines of codes as answer which seems correct, however, my result is not the same as the expected output. Can you help me for solving this problem? /* name - "Slim", type - "Giraffe", country_id - 1 */ INSERT INTO Animals 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; And Results: My Output: name,type,country bert,tiger,india candy,elephant,india vova,bear,russia slim,giraffe,usa merlin,lion,usa pop,horse,USA Expected Output: name,type,country Bert,Tiger,India Candy,Elephant,India Vova,Bear,Russia Slim,Giraffe,USA Merlin,Lion,USA Pop,Horse,USA
4 Answers
+ 3
Ahmad Tanha
There is problem with SQL compiler. My completed script is now not working. Report it to SoloLearn on [email protected].
+ 2
🅰🅹 🅐🅝🅐🅝🅣 Thanks for your comment.
I reported the problem, but I didn't receive any feedbacks!
+ 1
INSERT INTO Animals
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;
0
Hi mate, the last paragraph is meant to be ORDER BY Country