Search Header Logo

SQL Joins and Group By Quiz

Authored by Yusuf Satilmis

Computers

Professional Development

Used 2+ times

SQL Joins and Group By Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is an inner join in SQL?

An inner join in SQL combines rows from two or more tables based on a random column

An inner join in SQL combines rows from two or more tables based on a related column between them.

An inner join in SQL combines rows from two or more tables based on the sum of their values

An inner join in SQL combines rows from two or more tables based on the maximum value in a column

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How is an inner join different from an outer join?

An inner join returns all the rows from one table and only the matching rows from the other table

An inner join returns only the rows that have matching values in one table

An inner join returns only the rows that have matching values in both tables being joined, while an outer join returns all the rows from one table and only the matching rows from the other table.

An inner join returns all the rows from both tables being joined

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Complete the query:

SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderAmount, Orders.OrderDate
FROM Orders
INNER JOIN _______ ON _____________ = _____________;

INNER JOIN Orders ON Orders.OrderID=Orders.CustomerID;

INNER JOIN Customers ON Customer.CustomerID=Customers.CustomerID;

INNER JOIN Orders ON Orders.CustomerID=Customers.CustomerID;

INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID;

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Refer to the exhibit. Which type of SQL JOIN operation would return all the rows from Table 1 and Table 2?

LEFT JOIN

RIGHT JOIN

INNER JOIN

CROSS JOIN

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

When would you use an inner join in a SQL query?

To retrieve all the rows from the left table and the matched rows from the right table.

To retrieve only the rows that have non-matching values in both tables being joined.

To retrieve only the rows that have matching values in both tables being joined.

To retrieve all the rows from the right table and the matched rows from the left table.

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which JOIN clause would join the two tables Orders and Customers, using the CustomerID field in both tables as the relationship between the two tables?
SELECT *
FROM Orders
LEFT JOIN Customers ON ____________ = ______________;

ON Customer.CustomerID=Orders.CustomerID

ON Orders.CustomerID=Customers.CustomerID

ON Orders.CustomerID=Orders.CustomerID

ON Customers.CustomerID=Customers.CustomerID

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Refer to the exhibit. A data analyst writes a SQL query to extract information from multiple tables in the Movies database. To complete the ON command, what needs to be entered in place of the question mark in this query?
SELECT m.Title, m.Date, r.AuthorName, r.Score, r.Comment, r.Date
FROM Review AS r
JOIN Movie AS m
ON m.Title = ?;

r.MovieTitle;

r.Comment;

r.Score;

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?