SQL202 exercises

SQL Exercises with Answers

Practise SQL with 202 interactive exercises: multiple choice, fill-in-the-blank, output prediction and debugging. Every exercise gives instant feedback, a hint and the full solution.

Score0/ 202

1Introduction

Read the lesson
Fill in the blankseasyIntroduction

Complete the query so it returns every column from the products table.

 *  products;
Multiple choiceeasyIntroduction

In a database table, what is a row?

Multiple choicemediumIntroduction

Why does almost every table have an id primary key?

Predict the outputeasyIntroduction

How many rows does SELECT * FROM customers; return for the example shop?

Multiple choicemediumIntroduction

Which column is the best primary key for a customers table?

Fill in the blankseasySELECT

Complete the query so it returns only the name and price of every product.

SELECT name price FROM ;
Multiple choiceeasySELECT

Which keyword renames a column in the result?

Predict the outputmediumSELECT

How many rows does this return for the example shop?

SELECT DISTINCT city FROM customers;
Predict the outputmediumSELECT

What does this return for the Pen row?

SELECT name, price * 10 AS ten_pens FROM products;
Predict the outputmediumSELECT

How many rows does SELECT DISTINCT city FROM customers; return for this course's customers table?

3WHERE (Filtering)

Read the lesson
Fill in the blankseasyWHERE (Filtering)

Complete the query to find products that cost more than 20.

SELECT name, price
FROM products
 price  20;
Predict the outputmediumWHERE (Filtering)

Which names does this return?

SELECT name FROM customers
WHERE city IN ('Lisbon', 'Porto');
Multiple choicemediumWHERE (Filtering)

Which pattern finds product names that end in "lamp"?

Predict the outputhardWHERE (Filtering)

How many products does this return?

SELECT name FROM products
WHERE stock BETWEEN 15 AND 40;
Multiple choicemediumWHERE (Filtering)

Which condition finds products whose name starts with "B"?

4NULL Values

Read the lesson
Fill in the blankseasyNULL Values

Complete the query to find customers with no email address.

SELECT name FROM customers WHERE email ;
Multiple choiceeasyNULL Values

What does NULL mean in a database?

Predict the outputmediumNULL Values

A column bonus holds 100, NULL and 200. What does SELECT COUNT(bonus) FROM staff; return?

Predict the outputmediumNULL Values

What does SELECT COALESCE(NULL, NULL, 'x', 'y'); return?

Multiple choicehardNULL Values

Using the same bonus values (100, NULL, 200), what does AVG(bonus) return?

5ORDER BY & GROUP BY

Read the lesson
Fill in the blankseasyORDER BY & GROUP BY

Complete the query so the newest customers come first.

SELECT name, joined
FROM customers
 joined ;
Predict the outputeasyORDER BY & GROUP BY

What does this return?

SELECT COUNT(*) FROM customers WHERE city = 'Leeds';
Multiple choicemediumORDER BY & GROUP BY

Which clause keeps only the groups whose total stock is over 100?

Predict the outputmediumORDER BY & GROUP BY

Which product does this return?

SELECT name FROM products
ORDER BY stock DESC
LIMIT 1;
Multiple choicehardORDER BY & GROUP BY

Which query lists categories that have more than one product?

Fill in the blankseasyFunctions

Complete the query so every city is shown in capital letters.

SELECT (city) FROM customers;
Predict the outputeasyFunctions

What does this return?

SELECT LENGTH('Water bottle');
Predict the outputmediumFunctions

What does this return?

SELECT COALESCE(NULL, NULL, 'none', 'other');
Multiple choicemediumFunctions

Which expression avoids a division-by-zero error when qty is 0?

Predict the outputmediumFunctions

What does this return?

SELECT SUBSTR('Notebook', 5, 4);

7CASE Expressions

Read the lesson
Fill in the blankseasyCASE Expressions

Complete the expression so it ends correctly.

SELECT name,
       CASE WHEN price > 10 THEN 'Pricey' ELSE 'Cheap'  AS label
FROM products;
Predict the outputeasyCASE Expressions

What label does the Pen (price 1.20) get?

CASE
    WHEN price >= 20 THEN 'High'
    WHEN price >= 5 THEN 'Mid'
    ELSE 'Low'
END
Predict the outputmediumCASE Expressions

What does a CASE with no ELSE return when no WHEN matches?

Predict the outputmediumCASE Expressions

What does this return for the example products?

SELECT SUM(CASE WHEN category = 'Kitchen' THEN 1 ELSE 0 END) FROM products;
Multiple choicehardCASE Expressions

Which ORDER BY puts sold-out products last, then sorts by name?

8INSERT, UPDATE, DELETE

Read the lesson
Fill in the blankseasyINSERT, UPDATE, DELETE

Complete the statement to add a product called Ruler costing 2.10.

 products (name, category, price, stock)
 ('Ruler', 'Stationery', 2.10, 80);
Fill in the blanksmediumINSERT, UPDATE, DELETE

Complete the statement so only Ben's city changes to York.

UPDATE customers
 city = 'York'
 id = 2;
Predict the outputmediumINSERT, UPDATE, DELETE

How many rows does this change in the example products table?

UPDATE products SET stock = stock + 10 WHERE stock < 30;
Multiple choicemediumINSERT, UPDATE, DELETE

What's the safest first step before running a DELETE?

Multiple choicehardINSERT, UPDATE, DELETE

What happens if you run DELETE FROM orders; with no WHERE clause?

9Dates & Times

Read the lesson
Fill in the blankseasyDates & Times

Complete the SQLite query so it groups orders by year and month.

SELECT strftime('', order_date) AS month, COUNT(*)
FROM orders
GROUP BY month;
Multiple choiceeasyDates & Times

Which date format should you use in SQL?

Predict the outputmediumDates & Times

What does SELECT date('2024-07-30', '+5 days'); return in SQLite?

Multiple choicemediumDates & Times

Which WHERE clause returns every order placed in July 2024 from a timestamp column?

Multiple choicehardDates & Times

How do you get the number of days between two dates in MySQL?

10CREATE & ALTER TABLE

Read the lesson
Fill in the blankseasyCREATE & ALTER TABLE

Complete the statement that creates a table.

 tags (
    id INTEGER PRIMARY KEY,
    name TEXT NOT NULL
);
Fill in the blanksmediumCREATE & ALTER TABLE

Complete the statement that adds a phone column to customers.

 customers  phone VARCHAR(20);
Multiple choicemediumCREATE & ALTER TABLE

Which type is best for storing prices?

Predict the outputmediumCREATE & ALTER TABLE

After ALTER TABLE customers ADD COLUMN vip BOOLEAN;, what is Dev's vip value?

Multiple choicehardCREATE & ALTER TABLE

What's the difference between DELETE FROM t; and DROP TABLE t;?

11Constraints & Keys

Read the lesson
Fill in the blankseasyConstraints & Keys

Complete the column so every product must have a name.

name TEXT 
Fill in the blanksmediumConstraints & Keys

Complete the column so customer_id must match a customer.

customer_id INTEGER  customers(id)
Multiple choicemediumConstraints & Keys

Which constraint stops two users signing up with the same email?

Predict the outputmediumConstraints & Keys

With ON DELETE RESTRICT, what happens when you delete a customer who has orders?

Multiple choicehardConstraints & Keys

Which is true about a primary key?

Fill in the blankseasyJOIN

Complete the query that lists each order with its product name.

SELECT o.id, p.name
FROM orders o
 products p  o.product_id = p.id;
Multiple choicemediumJOIN

Which join returns every customer, even those without orders?

Predict the outputmediumJOIN

How many rows does this return?

SELECT c.name
FROM customers c
JOIN orders o ON o.customer_id = c.id
WHERE c.city = 'Leeds';
Predict the outputhardJOIN

After a LEFT JOIN from customers to orders, what is o.id for Ema?

Predict the outputhardJOIN

Using this course's tables, how many rows does an INNER JOIN of customers to orders return?

13More Joins

Read the lesson
Fill in the blankseasyMore Joins

Complete the anti-join that finds customers who have no orders.

SELECT c.name
FROM customers c
LEFT JOIN orders o ON o.customer_id = c.id
WHERE o.id ;
Multiple choiceeasyMore Joins

What is a self join?

Predict the outputmediumMore Joins

A table of 4 colours is CROSS JOINed with a table of 5 sizes. How many rows come back?

Multiple choicemediumMore Joins

Which join keeps every row from both tables?

Multiple choicehardMore Joins

Why does adding WHERE o.status = 'paid' to a LEFT JOIN from customers to orders remove customers with no orders?

14UNION & Set Operations

Read the lesson
Fill in the blankseasyUNION & Set Operations

Complete the query so every row from both tables is kept, including duplicates.

SELECT city FROM customers
UNION 
SELECT city FROM subscribers;
Multiple choiceeasyUNION & Set Operations

What does UNION do with duplicate rows?

Predict the outputmediumUNION & Set Operations

customers has 5 rows and subscribers has 4. How many rows does SELECT name FROM customers UNION ALL SELECT name FROM subscribers return?

Multiple choicemediumUNION & Set Operations

Which operation returns names that appear in both lists?

Multiple choicehardUNION & Set Operations

Where do the column names of a UNION result come from?

15Subqueries & CTEs

Read the lesson
Fill in the blankseasySubqueries & CTEs

Complete the query so it finds products cheaper than the average.

SELECT name FROM products
WHERE price < ( AVG(price) FROM products);
Fill in the blanksmediumSubqueries & CTEs

Complete the CTE.

 cheap  (
    SELECT * FROM products WHERE price < 10
)
SELECT name FROM cheap;
Predict the outputmediumSubqueries & CTEs

How many rows does this return for the example shop?

SELECT name FROM customers
WHERE id IN (SELECT customer_id FROM orders);
Multiple choicemediumSubqueries & CTEs

Why is SELECT 1 used inside EXISTS?

Multiple choicehardSubqueries & CTEs

What is a correlated subquery?

16Data Cleaning

Read the lesson
Fill in the blankseasyData Cleaning

Complete the query to remove spaces from both ends of each name.

SELECT (name) FROM signups;
Multiple choiceeasyData Cleaning

Which clause keeps only groups that appear more than once?

Predict the outputmediumData Cleaning

What does SELECT NULLIF(TRIM(' '), ''); return?

Multiple choicemediumData Cleaning

Why lowercase emails before looking for duplicates?

Multiple choicehardData Cleaning

Which DELETE keeps one copy of each duplicated email?

17Table Relationships

Read the lesson
Fill in the blankseasyTable Relationships

Complete the junction table's composite primary key.

CREATE TABLE product_tags (
  product_id INTEGER REFERENCES products(id),
  tag_id     INTEGER REFERENCES tags(id),
  PRIMARY KEY ()
);
Multiple choiceeasyTable Relationships

In a one-to-many relationship, where does the foreign key go?

Multiple choicemediumTable Relationships

Students can take many courses, and courses have many students. What do you need?

Multiple choicemediumTable Relationships

What does ON DELETE CASCADE do?

Predict the outputhardTable Relationships

Using the tag data in this lesson, how many rows does SELECT * FROM product_tags WHERE tag_id = 1; return?

18Normalization

Read the lesson
Fill in the blankseasyNormalization

Complete the rule of normalization.

Each fact is stored in exactly  place.
Multiple choiceeasyNormalization

Which column breaks first normal form?

Multiple choicemediumNormalization

You delete a customer's only order and lose all record of the customer. Which problem is this?

Multiple choicemediumNormalization

An orders table has columns id, customer_id and customer_city. Which normal form does customer_city break?

Multiple choicehardNormalization

Why does order_lines store unit_price even though products has a price?

Fill in the blankseasyViews

Complete the statement that saves a query as a view.

 cheap_products 
SELECT name, price FROM products WHERE price < 10;
Multiple choiceeasyViews

How do you read data from a view called cheap_products?

Predict the outputmediumViews

A product's price changes from 9 to 12. What does cheap_products (price < 10) show afterwards?

Multiple choicemediumViews

What does DROP VIEW order_details; delete?

Multiple choicehardViews

Which is a good reason to create a view?

20CTEs & Recursive Queries

Read the lesson
Fill in the blankseasyCTEs & Recursive Queries

Complete the keyword that starts a common table expression.

 recent AS (
  SELECT * FROM orders WHERE order_date >= '2024-07-05'
)
SELECT COUNT(*) FROM recent;
Multiple choiceeasyCTEs & Recursive Queries

How long does a CTE exist?

Predict the outputmediumCTEs & Recursive Queries

What does this return?

WITH RECURSIVE n(x) AS (
  SELECT 2 UNION ALL SELECT x * 2 FROM n WHERE x < 16
)
SELECT x FROM n;
Multiple choicemediumCTEs & Recursive Queries

How do you write two CTEs in one query?

Multiple choicehardCTEs & Recursive Queries

What are the two parts of a recursive CTE?

21Indexes & Performance

Read the lesson
Fill in the blankseasyIndexes & Performance

Complete the statement that adds an index on city.

 idx_customers_city  customers (city);
Multiple choiceeasyIndexes & Performance

What does a full table scan mean?

Multiple choicemediumIndexes & Performance

Which columns automatically get an index?

Predict the outputmediumIndexes & Performance

An index exists on (category, price). Which query can't use it efficiently?

Multiple choicehardIndexes & Performance

What's the downside of adding many indexes to a table?

22Transactions

Read the lesson
Fill in the blankseasyTransactions

Complete the transaction so both changes are saved.

;
UPDATE products SET stock = stock - 1 WHERE id = 2;
INSERT INTO orders (customer_id, product_id, order_date) VALUES (3, 2, '2024-07-20');
;
Multiple choiceeasyTransactions

What does ROLLBACK do?

Predict the outputmediumTransactions

What is Sam's balance after this?

BEGIN;
UPDATE accounts SET balance = balance - 30 WHERE owner = 'Sam';  -- was 100
ROLLBACK;
Multiple choicemediumTransactions

Which ACID property means committed data survives a power cut?

Multiple choicehardTransactions

Why shouldn't a transaction stay open while waiting for user input?

23Window Functions

Read the lesson
Fill in the blankseasyWindow Functions

Complete the query so products are numbered by price, highest first.

SELECT name, ROW_NUMBER()  (ORDER BY price DESC) AS n
FROM products;
Fill in the blanksmediumWindow Functions

Complete the window so the ranking restarts for each category.

RANK() OVER ( category ORDER BY price DESC)
Predict the outputmediumWindow Functions

Three rows have scores 90, 80 and 80. What does DENSE_RANK() OVER (ORDER BY score DESC) give?

Multiple choicemediumWindow Functions

Which function returns the value from the previous row?

Multiple choicehardWindow Functions

How is a window function different from GROUP BY?

24Triggers & Procedures

Read the lesson
Fill in the blankseasyTriggers & Procedures

Complete the trigger so it runs after a row is deleted from orders.

CREATE TRIGGER log_delete
 DELETE ON orders
BEGIN
  INSERT INTO deleted_orders VALUES (OLD.id);
END;
Multiple choiceeasyTriggers & Procedures

In an UPDATE trigger, what does OLD.price contain?

Multiple choicemediumTriggers & Procedures

Which trigger timing can stop a bad insert before it's saved?

Predict the outputmediumTriggers & Procedures

In this lesson's audit example, how many rows does price_history contain after the two UPDATEs?

Multiple choicehardTriggers & Procedures

What's the difference between a stored procedure and a function in PostgreSQL?

25Security & Permissions

Read the lesson
Fill in the blankseasySecurity & Permissions

Complete the parameterized query in Python's sqlite3.

cur.execute("SELECT * FROM users WHERE email = ", (email,))
Multiple choiceeasySecurity & Permissions

What causes SQL injection?

Predict the outputmediumSecurity & Permissions

With a parameterized query, a visitor searches for the name ' OR '1'='1. How many customers are returned?

Multiple choicemediumSecurity & Permissions

Which statement lets the user reports read the orders table?

Multiple choicehardSecurity & Permissions

What does the principle of least privilege mean?

26SQL syntax and comments

Read the lesson
Multiple choicemediumSQL syntax and comments

What does the commented Leeds-customer query return?

27SQL operators and precedence

Read the lesson
Multiple choicemediumSQL operators and precedence

Which sale ids pass (paid AND amount>=20) OR pending?

28SELECT DISTINCT

Read the lesson
Multiple choicemediumSELECT DISTINCT

How many rows does the distinct city list return, including its NULL row?

29SQL aliases

Read the lesson
Multiple choicemediumSQL aliases

What are the output labels for sale 103 in the alias example?

30LIKE and wildcard patterns

Read the lesson
Multiple choicemediumLIKE and wildcard patterns

Which customer matches the pattern 'B_n'?

31IN, BETWEEN, ANY and ALL

Read the lesson
Multiple choicemediumIN, BETWEEN, ANY and ALL

Which sale ids have an amount IN (5,30)?

32EXISTS and NOT EXISTS

Read the lesson
Multiple choicemediumEXISTS and NOT EXISTS

Which customer remains in the correlated NOT EXISTS example?

33IS NULL and IS NOT NULL

Read the lesson
Multiple choicemediumIS NULL and IS NOT NULL

Which sale is returned by WHERE amount IS NULL?

34LIMIT, TOP and FETCH FIRST

Read the lesson
Multiple choicemediumLIMIT, TOP and FETCH FIRST

Which two ids are selected by the largest-known-amount LIMIT example?

35SQL keywords and commands

Read the lesson
Multiple choicemediumSQL keywords and commands

What counts appear in the status-summary command example?

Multiple choicemediumMIN()

What minimum is reported for customer 3 in the worked grouping?

Multiple choicemediumMAX()

Which sale rows are returned by the maximum-amount comparison?

Multiple choicemediumCOUNT()

What are COUNT(*), COUNT(amount) and COUNT(DISTINCT amount), respectively?

Multiple choicemediumSUM()

What is the known amount total for paid sales?

Multiple choicemediumAVG()

What average is returned for paid sales only?

41Aggregate vs window functions

Read the lesson
Multiple choicemediumAggregate vs window functions

How many rows remain in the window-total example for customer 1?

42GROUP BY and HAVING

Read the lesson
Multiple choicemediumGROUP BY and HAVING

Which customers pass HAVING COUNT(*)>=2 in the identified-sales summary?

43SQL string functions

Read the lesson
Multiple choicemediumSQL string functions

What city_key is returned for Dev by LOWER(city)?

44SQL numeric and mathematical functions

Read the lesson

What quarter_amount is returned for sale 106?

45SQL date and time functions

Read the lesson
Multiple choicemediumSQL date and time functions

Which sale ids fall in the February half-open range?

46COALESCE and NULLIF

Read the lesson
Multiple choicemediumCOALESCE and NULLIF

What city_label does COALESCE(city,'Unknown') return for Dev?

47Conditional aggregation

Read the lesson
Multiple choicemediumConditional aggregation

What are the known_count and missing_count in the NULL-bucket exercise?

48CAST() and CONVERT()

Read the lesson
Multiple choicemediumCAST() and CONVERT()

What value is returned by the explicit decimal quarter calculation for sale 106?

49Multiple-column and NULL sorting

Read the lesson

Which id appears last in the explicit NULL-last ascending sort?

50CREATE DATABASE and DROP DATABASE

Read the lesson

After PostgreSQL CREATE DATABASE training_reference succeeds, what else is required before defining tables there?

51CREATE, ALTER and DROP TABLE

Read the lesson
Multiple choicemediumCREATE, ALTER and DROP TABLE

Which fields exist in lesson_notes after its ADD operation?

52SQL data types

Read the lesson
Multiple choicemediumSQL data types

Which sale ids have a known amount below twenty?

53INSERT INTO SELECT

Read the lesson
Multiple choicemediumINSERT INTO SELECT

How many rows are written into pending_sales_copy in the worked solution?

54SELECT INTO

Read the lesson
Multiple choicemediumSELECT INTO

What row count appears in the paid snapshot made from the fixture?

55DEFAULT, CHECK and UNIQUE constraints

Read the lesson

What status is saved when checked_sales omits the status column during insertion?

56AUTO_INCREMENT and identity columns

Read the lesson

What id does Finn receive in the fresh uninterrupted SQLite example?

57Primary keys and composite keys

Read the lesson
Multiple choicemediumPrimary keys and composite keys

Can customer_tags contain both (1,newsletter) and (2,newsletter)?

58Foreign keys and referential actions

Read the lesson

What remains after the SET NULL example deletes its practice parent?

59Temporary tables

Read the lesson
Multiple choicemediumTemporary tables

What are the smallest and largest known values in paid_stage?

60Database schema and metadata

Read the lesson
Multiple choicemediumDatabase schema and metadata

Which field does SQLite table_info mark as the customers primary key?

61INNER JOIN

Read the lesson
Multiple choicemediumINNER JOIN

How many rows appear in the full identified-customer INNER JOIN example?

62LEFT, RIGHT and FULL OUTER JOIN

Read the lesson
Multiple choicemediumLEFT, RIGHT and FULL OUTER JOIN

Which customer has a NULL paid_sale_id in the ON-filtered LEFT JOIN exercise?

63Self joins and cross joins

Read the lesson
Multiple choicemediumSelf joins and cross joins

Who is Dev’s immediate manager in the self-join output?

64Anti-joins and unmatched records

Read the lesson

Which customer is incorrectly added if the anti-join tests s.amount IS NULL instead of s.id IS NULL?

65UNION vs UNION ALL

Read the lesson
Multiple choicemediumUNION vs UNION ALL

How many occurrences does the UNION ALL city-count exercise retain?

66INTERSECT and EXCEPT

Read the lesson
Multiple choicemediumINTERSECT and EXCEPT

Which customer id remains in customers EXCEPT sales customer links?

67Correlated subqueries

Read the lesson
Multiple choicemediumCorrelated subqueries

What correlated known_total is reported for Dev?

68Derived tables

Read the lesson
Multiple choicemediumDerived tables

Which row survives the doubled_amount>40 derived-table exercise?

69Common table expressions

Read the lesson
Multiple choicemediumCommon table expressions

Which customer ids pass sale_count>=2 in the worked CTE exercise?

70Recursive queries

Read the lesson
Multiple choicemediumRecursive queries

What root-relative depth does Dev have when the anchor is Ben?

71Pivoting and conditional aggregation

Read the lesson

What missing_amounts value is reported for Dev by the guarded exercise?

72Ranking Functions

Read the lesson
Multiple choicemediumRanking Functions

Your report must return exactly one latest record per customer. Which approach gives a dependable choice?

73LAG and LEAD

Read the lesson
Multiple choicemediumLAG and LEAD

May follows March in a table where April is missing. What does LAG(amount) ordered by month return for May?

74Running Totals and Averages

Read the lesson
Multiple choicemediumRunning Totals and Averages

Which frame calculates a three-observation moving average including the current row?

75Window Frames and Partitions

Read the lesson
Multiple choicemediumWindow Frames and Partitions

Two sales share the same day. The report needs a total after each individual sale. Which design is clearest?

76Index Types and Composite Indexes

Read the lesson

Which query best matches an ordinary index on (customer_id, created_day)?

77EXPLAIN and Execution Plans

Read the lesson
Multiple choicemediumEXPLAIN and Execution Plans

You want to inspect a DELETE plan without changing rows. Which first step is appropriate?

78Query Optimization

Read the lesson
Multiple choicemediumQuery Optimization

An October timestamp report needs all times in October. Which boundary is clearest?

79ACID and Isolation Levels

Read the lesson
Multiple choicemediumACID and Isolation Levels

The conditional stock update affects zero rows. What should the application do?

80Deadlocks and Locking

Read the lesson
Multiple choicemediumDeadlocks and Locking

Two transfer paths update the same account pair in opposite orders. Which change reduces a common deadlock pattern?

81Procedures vs Functions

Read the lesson
Multiple choicemediumProcedures vs Functions

A PostgreSQL discount function reads a changing price table. Is IMMUTABLE an appropriate declaration?

82Trigger Use Cases

Read the lesson
Multiple choicemediumTrigger Use Cases

An audit trigger should record actual price changes only. Which test is essential?

83Database Design from Requirements

Read the lesson

Two physical copies share one book title. What needs separate identity?

84Entity-Relationship (ER) Diagrams

Read the lesson

A diagram promises every confirmed order has an item. What is needed beyond the child foreign key?

85One-to-One, One-to-Many and Many-to-Many Relationships

Read the lesson

One department needs many employees. Should employees.department_id be unique?

86Normalization: 1NF, 2NF, 3NF and BCNF

Read the lesson

employee_id -> department_id -> department_name repeats department facts. What helps?

87Data Integrity and Referential Integrity

Read the lesson

Two requests both pass an email-exists pre-check. What enforces uniqueness?

88SQL Data Cleaning and Deduplication

Read the lesson

Two products have the same name but different supplier keys. What is correct?

89Importing and Exporting CSV Data

Read the lesson

A CSV is on your laptop but COPY runs on a remote PostgreSQL server. What fits?

90Database Backup and Restore Basics

Read the lesson

A replica immediately receives an accidental DELETE. What additional protection is needed?

91SQL Security, Roles and Permissions

Read the lesson

Reporting needs product names but no updates. What should be granted?

92Parameterized Queries and SQL Injection Prevention

Read the lesson

A bound LIKE value contains %. What must be decided?

93MySQL tutorial

Read the lesson
Multiple choicemediumMySQL tutorial

What is the stock value of BAG in the supplied data?

94PostgreSQL tutorial

Read the lesson
Multiple choicemediumPostgreSQL tutorial

Which count gives Beacon zero after the left join?

95SQL Server and T-SQL

Read the lesson
Multiple choicemediumSQL Server and T-SQL

Why does invoice 3 appear before invoice 4 at the boundary?

96SQLite tutorial

Read the lesson
Multiple choicemediumSQLite tutorial

How many remaining pages are known for Field?

97SQL dialect differences

Read the lesson
Multiple choicemediumSQL dialect differences

Why use a CASE missing-value sort key?

98SQL interview questions

Read the lesson
Multiple choicemediumSQL interview questions

How many employees share the second-highest distinct salary here?

99SQL coding challenges

Read the lesson
Multiple choicemediumSQL coding challenges

Which event is excluded by the user-day selection rule?

100SQL exercises by difficulty

Read the lesson
Multiple choicemediumSQL exercises by difficulty

Which department has two result records but only one known score?

101SQL business query problems

Read the lesson
Multiple choicemediumSQL business query problems

What is Ana’s net paid value under this lesson’s definition?

102SQL reporting projects

Read the lesson
Multiple choicemediumSQL reporting projects

How many distinct users are active across the complete period?

Next steps