Answers to Projects


#1

For the projects in each SQL lesson, are there answers or an example of what the queries in the editor should look like? I think I did the projects correctly, but I just wanted to confirm.


#2

There aren't any offical answers. However, if you want feedback on a specific solution, feel free to create a post for it.


#3

Cant seem to get the project for create a table SQL code right, any ideas why?

My final SQL code is:

Create Table friends (id INTEGER, name TEXT, birthday INTEGER);

Insert Into friends (id, name, birthday) Values (1, 'Jane Doe', 1993-05-19);

Insert Into friends (id, name, birthday) Values (2, 'Hanif', 1997-07-16);

Insert Into friends (id, name, birthday) Values (3, 'Nala', 1947-01-01);

Insert Into friends (id, name, birthday) Values (4, 'Liza', 1996-07-16);

Update friends
Set name = 'Jane Smith'
Where id = 1;

Alter Table friends ADD COLUMN email TEXT;

Update friends
Set email = 'jdoe@example.com'
Where id= 1;

Update friends
Set email = 'hanif.black@gmail.com'
Where id= 2;

Update friends
Set email = 'nala@gmail.com'
Where id= 3;

Update friends
Set email = 'liza@gmail.com'
Where id= 4;

Delete From friends
Where id = 1;