SQL Joins and Group By Quiz

Quiz
•
Computers
•
Professional Development
•
Medium
Yusuf Satilmis
Used 2+ times
FREE Resource
Student preview

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
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
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
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 = ?;
Create a free account and access millions of resources
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
5 questions
Setting goals for the year

Quiz
•
Professional Development
11 questions
complex sentences

Quiz
•
Professional Development
8 questions
Ötzi the Iceman: A 5,000-Year-Old True Crime Murder Mystery | Full Documentary | NOVA | PBS

Interactive video
•
Professional Development
1 questions
Savings Questionnaire

Quiz
•
6th Grade - Professio...
6 questions
Basics of Budgeting 7

Quiz
•
6th Grade - Professio...
20 questions
Movies

Quiz
•
Professional Development