- 2

SQL; Cakes, Apartments, Zoo - not working!

Please help me solve the following problems. Cakes SELECT * FROM cakes ORDER BY calories LIMIT 3; This solution does not work((( Apartments SELECT * FROM Apartments WHERE Price > ( SELECT AVG ( Price ) FROM Apartments ) AND status = 'Not rented' ORDER BY Price; This solution does not work((( Zoo /* 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 country; This solution does not work((( I don't understand why it doesn't work this is BUG?????

14th Feb 2021, 4:54 PM
Денис Денисов
Денис Денисов - avatar
1 Réponse
0
For the Zoo, try this /* [..Task 1..] */ INSERT INTO animals (name, type, country_id) VALUES ('Slim', 'Giraffe', 1); /* [remember not to put quotes around numbers] */ /* [..Task2..] */ SELECT animals.name, animals.type, countries.country FROM animals INNER JOIN countries ON animals.country_id = countries.id ORDER BY Countries.country ASC; /* [ I did that and collected 100XP ] */
19th Feb 2021, 4:39 AM
Billy Korahan
Billy Korahan - avatar