Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help to run this program successful, how can I join the two tables? creat

ID: 3889769 • Letter: I

Question

I need help to run this program successful, how can I join the two tables?

create table videos(
id int not null Auto_Increment,
minutes INT not null,
url varchar(255) not null,
primary key (id)
);

insert into videos (id, minutes, url)
values ('5','8:10','www.youtube.com/watch?v=7zCYjI7bLOU');

insert into videos (id, minutes, url)
values ('6','13:42', 'www.youtube.com/watch?v=xd4iUY1zo1E');

insert into videos (id, minutes, url)
values ('7','15:36', 'www.youtube.com/watch?v=317PJUSzJRE');

insert into videos (id, minutes, url)
values ('8','8:59', 'www.youtube.com/watch?v=DJS5dd8D8Hk');

insert into videos (id, minutes, url)
values ('9','12:11', 'www.youtube.com/watch?v=0YY17t6hjpA');

create table reviews(
id int not null auto_increment,
Firstname varchar(255),
Rating varchar(255) not null,
shortreview varchar(255) not null,
primary key (id)
);

insert into reviews (firstname,id,rating, shortreview)
values ('Gisselle','9','4','Ok, needed more details');

insert into reviews (firstname,id,rating, shortreview)
values ('Mia','7','5','Loved it');

insert into reviews (firstname,id,rating, shortreview)
values ('Lisette','6','4','Great video');

insert into reviews (firstname,id,rating, shortreview)
values ('Jasmine','5','2','boring!');

insert into reviews (firstname,id,rating, shortreview)
values ('Natalie','8','3','not very informative');

SELECT *
FROM videos
INNER JOIN reviews
ON videos. = reviews.id

Explanation / Answer

To join given two tables, the sql query is as follows:

SELECT * FROM videos INNER JOIN reviews ON videos.id = reviews.id;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote