Campuslink - Admin - HCM21 - CPL - JAVA - 05 - Tests & Quizzes
Campuslink - Admin - HCM21 - CPL - JAVA - 05 - Tests & Quizzes
04_ASQL_Quiz1_SQL Advance 1
Show Feedback | Table of Contents
Part 1 of 1 -
Question 1 of 20
You have a table named Employees. You want to identify the supervisor to which each employee 5.0 Points
reports. You write the following query.
You need to ensure that the query returns a list of all employees and their respective supervisor. Which join
clause should you use to complete the query?
Reset Selection
Question 2 of 20
5.0 Points
Which of the following product groups can be found when searching the “Product Inventory” table
for products with a sales price of 500 dollars or more per unit and an inventory of less than 10 units?
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/deliverAssessm… 1/8
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
A. Large refrigerator, medium refrigerator, small refrigerator, air purifier, and air conditioner
B. Medium refrigerator, small refrigerator, portable refrigerator, coffee maker, and air conditioner
D.
Large refrigerator, medium refrigerator, small refrigerator, portable refrigerator, air purifier, coffee maker,
and air conditioner
Reset Selection
Question 3 of 20
How many tables may be included with a join? 5.0 Points
A. One
B. Two
C. Three
Reset Selection
Question 4 of 20
The following SQL is which type of join: 5.0 Points
SELECT CUSTOMER_T.CUSTOMER_ID, ORDER_T.CUSTOMER_ID, NAME, ORDER_ID
FROM CUSTOMER_T, ORDER_T
WHERE CUSTOMER_T.CUSTOMER_ID = ORDER_T.CUSTOMER_ID
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/deliverAssessm… 2/8
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
A. Inner Join
B. Cross Join
C. Outer Join
D. Self Join
Reset Selection
Question 5 of 20
5.0 Points
Which is the correct data returned from executing following SQL statements on the “Product” and
“Sales_Datails” tables?
SELECT X.Product_No
FROM Product X LEFT OUTER JOIN Sales_Details Y ON X.Product_No=Y.Product_No
Reset Selection
Question 6 of 20
The most frequently used relational operation, which merges data from two or more related tables 5.0 Points
into one resultant table, is called an cross-join.
True
False
Reset Selection
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/deliverAssessm… 3/8
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
Question 7 of 20
The following SQL is which type of join: 5.0 Points
SELECT CUSTOMER_T.CUSTOMER_ID, ORDER_T.CUSTOMER_ID, NAME, ORDER_ID
FROM CUSTOMER_T, ORDER_T ;
A. Cross Join
B. Outer Join
C. Self Join
D. Inner Join
Reset Selection
Question 8 of 20
5.0 Points
Which of the following SQL statements can extract the average salary by department from tables A
and B?
Reset Selection
Question 9 of 20
5.0 Points
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/deliverAssessm… 4/8
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
What type of join is needed when you wish to return rows when there is at least one match in both tables?
A. Cross-join
B. Inner join
C. Outer join
Reset Selection
Question 10 of 20
A CASE SQL statement is which of the following 5.0 Points
Reset Selection
Question 11 of 20
There should be one condition within the WHERE clause for each pair of tables being joined. 5.0 Points
True
False
Reset Selection
Question 12 of 20
The INNER JOIN clause? 5.0 Points
B. Returns all rows that have matching value in the field on which the 2 tables are joined.
D.
Returns only the rows from the first table, which have non-matching values with the second table in the
field on which the 2 tables are joined.
Reset Selection
Question 13 of 20
The following SQL is which type of join: 5.0 Points
SELECT CUSTOMER_T.CUSTOMER_ID, ORDER_T.CUSTOMER_ID, NAME, ORDER_ID
FROM CUSTOMER_T, ORDER_T ;
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/deliverAssessm… 5/8
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
A. Self Join
B. Outer Join
C. Cross Join
D. Inner Join
Reset Selection
Question 14 of 20
You have two tables named Customer and SalesOrder. In the Customer table you have 1000 5.0 Points
customers, of which 900 customers have orders in the SalesOrder table. You execute the following query to
list all customers that have had at least one sale.
You need to identify the results of the query. Which results will the query return?
A. No rows
B. The 900 rows in the Customer table with matching rows in the SalesOrder table
Reset Selection
Question 15 of 20
A UNION query is which of the following? 5.0 Points
A. Combines the output from multiple queries and does not include the same number of columns.
B.
Combines the output from no more than two queries and does not include the same number of columns.
C. Combines the output from multiple queries and must include the same number of columns.
D. Combines the output from no more than two queries and must include the same number of columns.
Reset Selection
Question 16 of 20
5.0 Points
In SQL the word ‘natural’ can be used with
A. Inner join
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/deliverAssessm… 6/8
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
Reset Selection
Question 17 of 20
Subqueries can be nested multiple times 5.0 Points
True
False
Reset Selection
Question 18 of 20
A function returns one value and has only output parameters. 5.0 Points
True
False
Reset Selection
Question 19 of 20
With the UNION clause, each query involved must output the same number of columns, and they 5.0 Points
must be UNION compatible.
True
False
Reset Selection
Question 20 of 20
If you join a table to itself, what kind of join are you using? 5.0 Points
A. Natural Join
C. Selective Join.
D. Self Join
Reset Selection
Save Exit
Submit for Grading
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/deliverAssessm… 7/8
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
Gateway
Accessibility Information
The Sakai Project
Powered by Sakai
Copyright 2017 FPT-Software
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/deliverAssessm… 8/8