All Coursera Quiz Answers

Test your knowledge: SQL joins Quiz Answers

In this article i am gone to share Coursera Course: Tools of the Trade: Linux and SQL Week 4 Practice Quiz | Test your knowledge: SQL joins Quiz Answers with you.. 

Enroll Link: Tools of the Trade: Linux and SQL


Also Visit:  Test your knowledge: More SQL filters Quiz Answers


 

Test your knowledge: SQL joins Quiz Answers

Question 1)
Which join types return all rows from only one of the tables being joined? Select all that apply.

  • LEFT JOIN
  • FULL OUTER JOIN
  • RIGHT JOIN
  • INNER JOIN

Question 2)
You are performing an INNER JOIN on two tables on the employee_id column. The left table is employees, and the right table is machines. Which of the following queries has the correct INNER JOIN syntax?

  • SELECT * FROM employees INNER JOIN machines ON employees.employee_id = machines.employee_id;
  • SELECT * FROM employees INNER JOIN machines WHERE employees.employee_id = machines.employee_id;
  • INNER JOIN machines ON employees.employee_id = machines.employee_id SELECT * FROM employees;
  • SELECT * FROM employees INNER JOIN ON employees.employee_id = machines.employee_id;

Question 3)
In the following query, which join returns all records from the employees table, but only records that match on employee_id from the machines table?

SELECT * FROM employees _____ machines ON employees.employee_id = machines.employee_id;

  • FULL OUTER JOIN
  • INNER JOIN
  • LEFT JOIN
  • RIGHT JOIN

Question 4)
As a security analyst, you are responsible for performing an INNER JOIN on the invoices and invoice_items tables of the Chinook database. These tables can be connected through the invoiceid column. Replace –??? with the missing information to complete the query. (If you want to undo your changes to the query, you can click the Reset button.)

SELECT customerid, trackidFROM invoices–???
SELECT customerid, trackid
FROM invoices
–???

What is the value in the trackid column of the first row that is returned from this query?

  • 449
  • 1
  • 3
  • 2