0

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

30th Apr 2021, 9:00 PM
Ahmad Tanha
Ahmad Tanha - avatar
4 Respuestas
+ 3
Ahmad Tanha There is problem with SQL compiler. My completed script is now not working. Report it to SoloLearn on info@sololearn.com.
30th Apr 2021, 9:37 PM
A͢J
A͢J - avatar
+ 2
🅰🅹 🅐🅝🅐🅝🅣 Thanks for your comment. I reported the problem, but I didn't receive any feedbacks!
3rd May 2021, 9:54 AM
Ahmad Tanha
Ahmad Tanha - avatar
+ 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;
12th Sep 2022, 1:19 PM
FATIMA USMAN TSOHO
FATIMA USMAN TSOHO - avatar
0
Hi mate, the last paragraph is meant to be ORDER BY Country
23rd Jan 2023, 9:17 PM
Rafiu Olawale Ladipo