Ga naar inhoud

Header

Quiz - Assignments

1. What does SQL mean?

  1. 🔲 Structured Query Language
  2. 🔲 Standard Quality Language
  3. 🔲 Standard Question Labelling
  4. 🔲 Structured Query Labelling




2. Which SQL statement retrieves data from a table?

  1. 🔲 OPEN
  2. 🔲 GET
  3. 🔲 SELECT
  4. 🔲 EXTRACT




3. Which SQL statement modifies data in a table?

  1. 🔲 MODIFY
  2. 🔲 SAVE
  3. 🔲 UPDATE
  4. 🔲 STORE




4. Which SQL statement deletes data from a table?

  1. 🔲 CANCEL
  2. 🔲 ERASE
  3. 🔲 REMOVE
  4. 🔲 DELETE




5. Which SQL statement adds data to a table?

  1. 🔲 INSERT INTO
  2. 🔲 ADD
  3. 🔲 PUT
  4. 🔲 ADDING




6. Which query do you use to retrieve column first_name from table students?

  1. 🔲 SELECT first_name FROM students
  2. 🔲 GET first_name FROM students
  3. 🔲 SELECT students.first_name




7. Which query do you use to retrieve all columns from table students?

  1. 🔲 SELECT ALL FROM students
  2. 🔲 SELECT * FROM students
  3. 🔲 SELECT students




8. Which query do you use to retrieve all rows from table students where first name is equal to John?

  1. 🔲 SELECT * FROM students WHERE first_name != 'John'
  2. 🔲 SELECT * FROM students WHERE first_name = 'John'
  3. 🔲 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?

  1. 🔲 SELECT * FROM students WHERE first_name LIKE 'J%'
  2. 🔲 SELECT * FROM students WHERE first_name = 'J%'
  3. 🔲 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?

  1. 🔲 SELECT * FROM students WHERE first_name = 'John' && last_name = 'Joe'
  2. 🔲 SELECT * FROM students WHERE first_name = 'John' AND last_name = 'Joe'
  3. 🔲 SELECT * FROM students WHERE first_name = 'John' OR last_name = 'Joe'




11. Which SQL statement do you use to retrieve unique values?

  1. 🔲 SELECT DIFFERENT
  2. 🔲 SELECT UNIQUE
  3. 🔲 SELECT DISTINCT




12. Which SQL statement do you use to sort?

  1. 🔲 SORT
  2. 🔲 SORT BY
  3. 🔲 ORDER BY




13. Which SQL statement do you use to sort in descending order?

  1. 🔲 ASC
  2. 🔲 DESCENDING
  3. 🔲 DESC
  4. 🔲 ASCENDING




14. Which query do you use to retrieve all rows from table students and sort them in descending order by column first_name?

  1. 🔲 SELECT * FROM students ORDER BY first_name DESC
  2. 🔲 SELECT * FROM students ORDER BY first_name ASC
  3. 🔲 SELECT * FROM students SORT BY first_name DESC




15. Which query do you use to add a row to table students?

  1. 🔲 INSERT INTO students VALUES ('John', 'Joe')
  2. 🔲 ADD INTO students VALUES ('John', 'Joe')
  3. 🔲 INSERT VALUES ('John', 'Joe') INTO students




16. Which query do you use to count the number of rows in table students?

  1. 🔲 SELECT COUNT() FROM students
  2. 🔲 SELECT COUNT(*) FROM students
  3. 🔲 COUNT(*) FROM students




17. Which statement is most commonly used to combine tables?

  1. 🔲 INNER JOIN
  2. 🔲 LEFT JOIN
  3. 🔲 RIGHT JOIN
  4. 🔲 FULL JOIN




18. Which statement do you use to name a range of values?

  1. 🔲 RANGE
  2. 🔲 WITHIN
  3. 🔲 BETWEEN




19. Which statement do you use to group?

  1. 🔲 GROUP BY
  2. 🔲 AGGREGATE BY
  3. 🔲 GROUP ON




20. Which function do you use to calculate an average?

  1. 🔲 MEAN()
  2. 🔲 AVG()
  3. 🔲 MEDIAN()