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

11. 1. Challenge A simple blog database A sql-5-7.sql file has been opened for y

ID: 3916474 • Letter: 1

Question

11. 1. Challenge A simple blog database A sql-5-7.sql file has been opened for you. In the sql-5-7.sql file:

1. Use the blog database

2. Write a SQL RIGHT OUTER JOIN statement that joins the user_id column from the blog.posts table, the name column of the blog.users table and the body column of the blog.posts table together.

Once you have completed these tasks press the Check It! button to have your solution assessed. Check It!

mysql> SHOW columns FROM blog.posts; 1 l Field I Type I Nul ? l Key | Default | Extra H. 1 | int (3) unsigned | NO PRI I NULL | auto_increment NULL | body text | user_id int (7) unsigned |NO MUL|NULL I YES 3 rows in set (0.00 sec)

Explanation / Answer

SELECT *
FROM blog.posts b1
RIGHT JOIN blog.users b2 ON b1.user_id = b2.name or b1.body=b2.name;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote