Module 3 Quiz >> Week 3 >> SQL for Data Science

Module 3 Quiz >> Week 3 >> SQL for Data Science

1. Question 1 Which of the following statements is true regarding subqueries? 1 point Subqueries always process the outermost query first and the work inward. Subqueries will process whichever query you indicate for them to process first. Subqueries always process the innermost query first and the work outward. 2. Question 2 If you can accomplish the same outcome with a join or a subquery, which one should you always choose? 1 point A subquery because they are always faster A join because they are always faster Joins are usually faster, but subqueries can be more reliable, so it depends on your situation. Whichever one you understand better and can write faster. 3. Question 3 The following diagram is a depiction of what type of join? 1 point Left Join Right Join Inner Join Full Outer Join 4. Question 4 Select which of the following statements are true regarding inner joins. (Select all that apply) 1 point Inner joins are one of the most popular types of joins use Inner joins retrieve all matching and nonmatching rows from a table There is no limit to the number of table you can join with an inner join. Performance will most likely worsen with the more joins you make 5. Question 5 Which of the following is true regarding Aliases? (Select all that apply.) 1 point Aliases are often used to make column names more readable. SQL aliases are used to give a table, or a column in a table, a temporary name. An alias only exists for the duration of the query. 6. Question 6 What is wrong with the following query? 12345 SELECT Customers.CustomerName, Orders.OrderID FROM LEFT JOIN ON Customers.CustomerID = Orders.CustomerID FROM Orders AND Customers ORDER BY CustomerName; 1 point Column names do not have an alias Should be using an inner join rather than a left join The table name comes after the join condition 7. Question 7 What is the difference between a left join and a right join? 1 point A left join always is used before a right join in a query statement There is actually no difference between a left and a right join. The only difference between a left and right join is the order in which the tables are relating. A right join is always used before a full outer join, whereas a left join is always used after a full outer join 8. Question 8 If you perform a cartesian join on a table with 10 rows and a table with 20 rows, how many rows will there be in the output table? 1 point 15 10 20 200 9. Question 9 Which of the following statements about Unions is true? (select all that apply) 1 point The UNION operator is used to combine the result-set of two or more SELECT statements The order of the SELECTed columns in a UNION does not matter Each SELECT statement within UNION must have the same number of columns The columns must also have similar data types 10. Question 10 Data scientists need to use joins in order to: (select the best answer) 1 point Create new tables. Retrieve data from multiple tables. Filter data from multiple tables.

*Please Wait 15 Seconds To Get The Pdf Loaded

Leave a Comment