WGU D427 DATABASE MANAGEMENT
PRACTICE PAPER 2026 QUESTIONS WITH
SOLUTIONS GRADED A+
◉Find the names of all employees who have sold over 30,000 to a
single client
Employee table:
emp_id, first_name, last_name, birth_date, sex, salary, super_id,
branch_id
Works_With table:
emp_id, client_id, total_sales. Answer: SELECT employee.first_name,
employee.last_name
FROM employee
WHERE employee.emp_id IN
(SELECT works_with.emp_id
FROM works_with
,WHERE works_with.total_sales > 30000);
◉Find all clients who are handled by the branch that Michael Scott
manages
Assume you know Michaels ID.
(Michael Scott Emp_ID = 102)
Client table:
client_id, client_name, branch_id
Branch table:
branch_id, branch_name, mgr_id, mgr_start_date. Answer: SELECT
client.client_name
FROM client
WHERE client.branch_id = (SELECT branch.branch_id
FROM branch
WHERE branch.mgr_id = 102
LIMIT 1);
◉Write a query that lists the titles of films with the fewest rows in
the inventory table.
,actor table
actor_id, first_name, last_name, last_update
film_actor table
actor_id, film_id, last_update
film table
film_id, title, description, release_year, language_id,
original_language_id, rental_duration, rental_rate, length,
replacement_cost, rating, special_features, last_update
inventory table
inventory_id, film_id, store_id, last_update. Answer: SELECT title
FROM film
WHERE film_id IN (
SELECT film_id
FROM inventory
GROUP BY film_id
HAVING COUNT(film_id) =
---- Use the following subquery:---
( SELECT MIN(count_film_id) FROM
, ( SELECT COUNT(film_id) AS count_film_id
FROM inventory
GROUP BY film_id )
AS temp_table ));
◉The Movie table has the following columns:
ID - positive integer
Title - variable-length string
Genre - variable-length string
RatingCode - variable-length string
Year - integer
Write ALTER statements to make the following modifications to the
Movie table:
Add a Producer column with VARCHAR data type (max 50 chars).
Remove the Genre column.
Change the Year column's name to ReleaseYear, and change the data
type to SMALLINT.. Answer: ALTER TABLE Movie
ADD Producer VARCHAR(50);
ALTER TABLE Movie
DROP Genre;
PRACTICE PAPER 2026 QUESTIONS WITH
SOLUTIONS GRADED A+
◉Find the names of all employees who have sold over 30,000 to a
single client
Employee table:
emp_id, first_name, last_name, birth_date, sex, salary, super_id,
branch_id
Works_With table:
emp_id, client_id, total_sales. Answer: SELECT employee.first_name,
employee.last_name
FROM employee
WHERE employee.emp_id IN
(SELECT works_with.emp_id
FROM works_with
,WHERE works_with.total_sales > 30000);
◉Find all clients who are handled by the branch that Michael Scott
manages
Assume you know Michaels ID.
(Michael Scott Emp_ID = 102)
Client table:
client_id, client_name, branch_id
Branch table:
branch_id, branch_name, mgr_id, mgr_start_date. Answer: SELECT
client.client_name
FROM client
WHERE client.branch_id = (SELECT branch.branch_id
FROM branch
WHERE branch.mgr_id = 102
LIMIT 1);
◉Write a query that lists the titles of films with the fewest rows in
the inventory table.
,actor table
actor_id, first_name, last_name, last_update
film_actor table
actor_id, film_id, last_update
film table
film_id, title, description, release_year, language_id,
original_language_id, rental_duration, rental_rate, length,
replacement_cost, rating, special_features, last_update
inventory table
inventory_id, film_id, store_id, last_update. Answer: SELECT title
FROM film
WHERE film_id IN (
SELECT film_id
FROM inventory
GROUP BY film_id
HAVING COUNT(film_id) =
---- Use the following subquery:---
( SELECT MIN(count_film_id) FROM
, ( SELECT COUNT(film_id) AS count_film_id
FROM inventory
GROUP BY film_id )
AS temp_table ));
◉The Movie table has the following columns:
ID - positive integer
Title - variable-length string
Genre - variable-length string
RatingCode - variable-length string
Year - integer
Write ALTER statements to make the following modifications to the
Movie table:
Add a Producer column with VARCHAR data type (max 50 chars).
Remove the Genre column.
Change the Year column's name to ReleaseYear, and change the data
type to SMALLINT.. Answer: ALTER TABLE Movie
ADD Producer VARCHAR(50);
ALTER TABLE Movie
DROP Genre;