SQL Skill Assessment

Written by Coursera • Updated on

Test your SQL skills with this quick assessment. Answer 10 multiple-choice questions to get your score, then check the Scoring Guide to find your level and recommended learning path.

SQL Skill Assessment

SQL Programming Quiz

1. Which SQL statement is used to retrieve data from a database?

GET
SELECT
OBTAIN
EXTRACT

2. What is the difference between INNER JOIN and LEFT JOIN?

No difference
INNER JOIN returns matched records only, LEFT JOIN returns all records from left table and matched from right
INNER JOIN is faster than LEFT JOIN
LEFT JOIN can only be used with two tables

3. What will this query return?

SELECT COUNT(DISTINCT department_id)
FROM employees;
  
Total number of employees
Number of unique department IDs
Number of departments with employees
Number of employees in each department

4. Which of these is the correct syntax for a subquery?

SELECT * FROM employees WHERE salary > AVG(salary);
SELECT * FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);
SELECT * FROM employees WHERE salary > AVERAGE(salary);
SELECT * FROM employees HAVING salary > AVG(salary);

5. What is the purpose of an INDEX in SQL?

To format data in tables
To speed up data retrieval
To validate data entry
To create relationships between tables

6. Which statement about HAVING vs WHERE is correct?

They are interchangeable
HAVING is used with GROUP BY and filters groups, WHERE filters individual rows
WHERE is newer than HAVING
HAVING is faster than WHERE

7. What will this query do?

UPDATE employees 
SET salary = salary * 1.1 
WHERE department_id IN (
    SELECT department_id 
    FROM departments 
    WHERE location = 'New York'
);
  
Give all employees a 10% raise
Move all employees to New York
Give employees in New York departments a 10% raise
List all employees in New York

8. What is a stored procedure?

A way to store data in tables
A saved set of SQL statements that can be reused
A method to back up databases
A type of database index

9. Which statement about ACID properties is correct?

They refer to database backup procedures
They ensure database transaction reliability
They are used for data encryption
They optimize query performance

10. What is the purpose of a CTE (Common Table Expression)?

To create temporary tables
To write recursive queries and improve query readability
To establish foreign key constraints
To index tables

Scoring Guide & Course Recommendations

0-30: Beginner Level

40-70: Intermediate Level

80-100: Advanced Level

Skills Covered by Level

Beginner Level

  • SELECT statements

  • WHERE clauses

  • Basic JOIN operations

  • INSERT, UPDATE, DELETE

  • GROUP BY and ORDER BY

  • Basic aggregation functions

Intermediate Level

  • Complex JOINs

  • Subqueries

  • Window functions

  • Views

  • Indexes

  • Transaction management

  • Stored procedures

Advanced Level

  • Query optimization

  • Database design

  • Performance tuning

  • Partitioning

  • Security management

  • Backup and recovery

  • ETL processes

Common SQL Platforms Covered

  • MySQL

  • PostgreSQL

  • Microsoft SQL Server

  • Oracle Database

  • SQLite

Career Paths

Updated on
Written by:

Coursera

Writer

Coursera is the global online learning platform that offers anyone, anywhere access to online course...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.