
Quiz - Assignments
1. What does SQL mean?
- 🔲 Structured Query Language
- 🔲 Standard Quality Language
- 🔲 Standard Question Labelling
- 🔲 Structured Query Labelling
2. Which SQL statement retrieves data from a table?
- 🔲
OPEN
- 🔲
GET
- 🔲
SELECT
- 🔲
EXTRACT
3. Which SQL statement modifies data in a table?
- 🔲
MODIFY
- 🔲
SAVE
- 🔲
UPDATE
- 🔲
STORE
4. Which SQL statement deletes data from a table?
- 🔲
CANCEL
- 🔲
ERASE
- 🔲
REMOVE
- 🔲
DELETE
5. Which SQL statement adds data to a table?
- 🔲
INSERT INTO
- 🔲
ADD
- 🔲
PUT
- 🔲
ADDING
6. Which query do you use to retrieve column first_name from table students?
- 🔲
SELECT first_name FROM students
- 🔲
GET first_name FROM students
- 🔲
SELECT students.first_name
7. Which query do you use to retrieve all columns from table students?
- 🔲
SELECT ALL FROM students
- 🔲
SELECT * FROM students
- 🔲
SELECT students
8. Which query do you use to retrieve all rows from table students where first name is equal to John?
- 🔲
SELECT * FROM students WHERE first_name != 'John'
- 🔲
SELECT * FROM students WHERE first_name = 'John'
- 🔲
SELECT students.first_name = 'John'
9. Which query do you use to retrieve all rows from table students where first name starts with the letter J?
- 🔲
SELECT * FROM students WHERE first_name LIKE 'J%'
- 🔲
SELECT * FROM students WHERE first_name = 'J%'
- 🔲
SELECT * FROM students WHERE first_name LIKE 'J*'
10. Which query do you use to retrieve all rows from table students where first name is equal to John, and last name is equal to Joe?
- 🔲
SELECT * FROM students WHERE first_name = 'John' && last_name = 'Joe'
- 🔲
SELECT * FROM students WHERE first_name = 'John' AND last_name = 'Joe'
- 🔲
SELECT * FROM students WHERE first_name = 'John' OR last_name = 'Joe'
11. Which SQL statement do you use to retrieve unique values?
- 🔲
SELECT DIFFERENT
- 🔲
SELECT UNIQUE
- 🔲
SELECT DISTINCT
12. Which SQL statement do you use to sort?
- 🔲
SORT
- 🔲
SORT BY
- 🔲
ORDER BY
13. Which SQL statement do you use to sort in descending order?
- 🔲
ASC
- 🔲
DESCENDING
- 🔲
DESC
- 🔲
ASCENDING
14. Which query do you use to retrieve all rows from table students and sort them in descending order by column first_name?
- 🔲
SELECT * FROM students ORDER BY first_name DESC
- 🔲
SELECT * FROM students ORDER BY first_name ASC
- 🔲
SELECT * FROM students SORT BY first_name DESC
15. Which query do you use to add a row to table students?
- 🔲
INSERT INTO students VALUES ('John', 'Joe')
- 🔲
ADD INTO students VALUES ('John', 'Joe')
- 🔲
INSERT VALUES ('John', 'Joe') INTO students
16. Which query do you use to count the number of rows in table students?
- 🔲
SELECT COUNT() FROM students
- 🔲
SELECT COUNT(*) FROM students
- 🔲
COUNT(*) FROM students
17. Which statement is most commonly used to combine tables?
- 🔲
INNER JOIN
- 🔲
LEFT JOIN
- 🔲
RIGHT JOIN
- 🔲
FULL JOIN
18. Which statement do you use to name a range of values?
- 🔲
RANGE
- 🔲
WITHIN
- 🔲
BETWEEN
19. Which statement do you use to group?
- 🔲
GROUP BY
- 🔲
AGGREGATE BY
- 🔲
GROUP ON
20. Which function do you use to calculate an average?
- 🔲
MEAN()
- 🔲
AVG()
- 🔲
MEDIAN()