Nem találta meg, amit keresett?
Új bejegyzés3 hozzászólás
-
I'm stuck on step 2.
My code:CREATE TABLE persons (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
age INTEGER);
INSERT INTO persons (name, age) VALUES ("Bobby McBobbyFace", 12);
INSERT INTO persons (name, age) VALUES ("Lucy BoBucie", 25);
INSERT INTO persons (name, age) VALUES ("Banana FoFanna", 14);
INSERT INTO persons (name, age) VALUES ("Shish Kabob", 20);
INSERT INTO persons (name, age) VALUES ("Fluffy Sparkles", 8);
CREATE table hobbies (
id INTEGER PRIMARY KEY AUTOINCREMENT,
person_id INTEGER,
name TEXT);
INSERT INTO hobbies (person_id, name) VALUES (1, "drawing");
INSERT INTO hobbies (person_id, name) VALUES (1, "coding");
INSERT INTO hobbies (person_id, name) VALUES (2, "dancing");
INSERT INTO hobbies (person_id, name) VALUES (2, "coding");
INSERT INTO hobbies (person_id, name) VALUES (3, "skating");
INSERT INTO hobbies (person_id, name) VALUES (3, "rowing");
INSERT INTO hobbies (person_id, name) VALUES (3, "drawing");
INSERT INTO hobbies (person_id, name) VALUES (4, "coding");
INSERT INTO hobbies (person_id, name) VALUES (4, "dilly-allying");
INSERT INTO hobbies (person_id, name) VALUES (4, "meowing");
INSERT INTO persons (name, age) VALUES ("Bobby",3);
INSERT INTO hobbies (name) VALUES ("Bobbying");
SELECT FROM persons(name) JOIN hobbies(name); -
In Step 2 of the Bobby's Hobbies Challenger, we want to
see each person's name next to their hobby.
In a SQL statement, the fields that you want to see in your query must be included in your SELECT clause. There are no fields listed in the SELECT clause in your example, and the JOIN clause is written incorrectly. You may need to review the preceding videos.
A better way to get help with your code is to post your questions in the "Questions" tab below the video lessons or in the "Help Requests" tab below your project.
-
In Step 2 of the Bobby's Hobbies Challenger, we want to
see each person's name next to their hobby.
In a SQL statement, the fields that you want to see in your query must be included in your SELECT clause. There are no fields listed in the SELECT clause in your example, and the JOIN clause is written incorrectly. You may need to review the preceding videos.
A better way to get help with your code is to post your questions in the "Questions" tab below the video lessons or in the "Help Requests" tab below your project.
Hozzászólások írásához jelentkezzen be.