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: 3920363 • 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:

Use the blog database

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

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: Use the blog database 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.

This is my code

USE blog;
SELECT posts.user_id, posts.name, posts.body
FROM posts p
RIGHT OUTER p.user_id ON p.posts.users = p.body;

but it didn't work it give me an error can someone please help me to figure out why and whats wrong

LAST RUN on 8/2/2018, 4:48:18 PM

Explanation / Answer

SOLUTION:

According to the given data the below code follows;

SQL QUERY:

USE DATABASE blog

SELECT * FROM

blog_posts

RIGHT [OUTER] JOIN blog_users

ON blog_posts.user_id = blog_users.user_id ;

àIn this structured query language it never accepts the DOT in a table name,for example blog_users is used instead of bolg.users.

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