Table of Contents
This article presents [QUIZ] Test Your Understanding of SQL - Part 7 in a clear, structured format. It helps readers review key concepts, test their understanding, and learn from the material.
Understanding [QUIZ] Test Your Understanding of SQL
- Question 1: What is the result of the following SQL statement?
SELECT COUNT (DISTINCT STUDENT_ID) FROM EXAM_RESULTS;- 3
- 4
- 5
- 6
- Question 2: Which SQL statement is used to calculate the average test score for the 1st test?
- SELECT AVG (DIEM_KT) FROM KETQUA_KIEMTRA;
- SELECT AVG (DIEM_KT) FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 1;
- SELECT AVG (DIEM_KT) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
- SELECT COUNT (DIEM_KT) FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 1;
- Question 3: Which SQL statement is used to calculate each test how many students have done?
- SELECT COUNT (DISTINCT ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
- SELECT ID_BAIKT, MAX (ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
- SELECT ID_BAIKT, COUNT (DISTINCT ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
- SELECT ID_BAIKT, MIN (ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
- Question 4: Which SQL statement is used to print out the record of all students who start with 'L'?
- SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV LIKE 'L%';
- SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV LIKE 'L';
- SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV = 'L';
- SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV <> 'L';
- Question 5: What is the result of the following SQL statement?
SELECT MAX (DIEM_KT) FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 1 AND HO_SV LIKE '%U%';- 95
- 85
- 100
- 78
- Question 6: Which SQL statement is used to print out the records of all students whose first or last name ends with 'N'?
- SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE '% N' OR HO_SV LIKE '% N';
- SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE 'N' OR HO_SV LIKE 'N';
- SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE 'N%' OR HO_SV LIKE 'N%';
- SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE '% N%' OR HO_SV LIKE '% N%';
- Question 7: Which SQL statement is used to find the names of all students who score higher than 90 on the 2nd test?
- SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 2 OR DIEM_KT> 90;
- SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 2 AND DIEM_KT> 90;
- SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE DIEM_KT> 90;
- SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 2 HAVING DIEM_KT> 90;
- Question 8: Which SQL statement is used to find the names of all students who scored a total of 2 tests higher than 180?
- SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA GROUP BY TEN_SV, HO_SV;
- SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA HAVING SUM (DIEM_KT)> 180;
- SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA GROUP BY TEN_SV, HO_SV HAVING SUM (DIEM_KT)> 180;
- SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA WHERE DIEM_KT> 180 GROUP BY TEN_SV, HO_SV;
- Question 9: How many records have the following SQL statement generated?
SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV LIKE '%U%' AND DIEM_KT > 75;- 3
- 4
- 5
- There is no answer
- Question 10: How many records do the following SQL statements return?
SELECT * FROM KETQUA_KIEMTRA WHERE ID_SV <= 12 AND DIEM > 85;- 5
- 4
- 3
- 2
FAQ
What is the main point of [QUIZ] Test Your Understanding of SQL - Part 7?
Question 1: What is the result of the following SQL statement? SELECT COUNT (DISTINCT STUDENT_ID) FROM EXAM_RESULTS; 3 4 5 6 Question 2: Which SQL statement is used to calculate the average test score for the 1st test?
Why is [QUIZ] Test Your Understanding of SQL - Part 7 important?
[QUIZ] Test Your Understanding of SQL - Part 7 matters because it can affect how readers understand, choose, use, or respond to the subject discussed in the article.
What should readers verify about [QUIZ] Test Your Understanding of SQL - Part 7?
Check the date, product or software version, compatibility, and any current guidance before acting, especially when technology, security, health, or pricing is involved.
Reader Comments 0
Sign in with email or Google to join the discussion.