100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

D427 – CODE UPDATED ACTUAL Questions and CORRECT Answers

Rating
-
Sold
-
Pages
21
Grade
A+
Uploaded on
30-09-2025
Written in
2025/2026

D427 – CODE UPDATED ACTUAL Questions and CORRECT Answers

Institution
WGU D427
Course
WGU D427

Content preview

D427 – CODE UPDATED ACTUAL Questions and CORRECT Answers

1.47 Write the SQL to create a Product table with the
following columns:
ID - Integer
Name - Variable-length string with maximum 40 charac- CREATE TABLE Product (
ters ID INT,
ProductType - Variable-length string with maximum 3 Name VARCHAR(40),
characters ProductType VARCHAR(3),
OriginDate - Year, month, and day OriginDate DATE,
Weight - Decimal number with six significant digits and Weight DECIMAL(6,1)
one digit after the - decimal point );
Place your CREATE TABLE statement before the INSERT
and SELECT statements. Run your solution and verify the
result table contains the three inserted rows.
1.54 Write the SQL to create a Product table with the
following columns:
ID - Integer with range 0 to 65,535
CREATE TABLE Product (
Name - Variable-length string with maximum 40 charac-
ID SMALLINT UNSIGNED,
ters
Name VARCHAR(40),
ProductType - Fixed-length string with 3 characters
ProductType CHAR(3),
OriginDateTime - Year, month, day, and time
OriginDateTime DATETIME,
Weight - Decimal number with variable precision and 4
Weight FLOAT
bytes of storage
);
Place your CREATE TABLE statement before the INSERT
and SELECT statements. Run your solution and verify the
result table contains the three inserted rows.
1.6.9
The given SQL creates a Movie table and inserts some
movies. The SELECT statement selects all movies released
before January 1, 2000.
Modify the SELECT statement to select the title and release
date of PG-13 movies that are released after January 1,

,2008.
SELECT Title, ReleaseDate
Run your solution and verify the result table shows just the
FROM Movie
titles and release dates for The Dark Knight and Crazy Rich
WHERE Rating = 'PG-13' AND ReleaseDate > '2008-01-01';
Asians.
1.79
Modify the SELECT statement to only select songs that SELECT *
have a NULL Title value. Then run your solution, and verify FROM Song
the new query returns only songs by Taylor Swift and WHERE Title IS NULL;
Nirvana.
SELECT * FROM Song WHERE Title IS NULL OR Artist IS
1.7.11 NULL;
Modify the SELECT statement to select only songs that or
have a NULL Title or NULL Artist. SELECT * FROM Song WHERE Title = NULL OR Artist =
NULL;
UPDATE Song
SET Title = 'With Or Without You'
1.8.6 WHERE ID = 200;
Write three UPDATE statements to make the following
changes: UPDATE Song
Change the title from 'One' to 'With Or Without You'. SET Artist = 'Aretha Franklin'
Change the artist from 'The Righteous Brothers' to 'Aretha WHERE ID = 300;
Franklin'.
Change the release years of all songs after 1990 to 2021. UPDATE Song
SET ReleaseYear = 2021
WHERE ReleaseYear > 1990;
197
The given SQL creates a Movie table with an auto-incre-
menting ID column. INSERT INTO Movie (Title, Rating, ReleaseDate)
Write a single INSERT statement immediately after VALUES ('Raiders of the Lost Ark', 'PG', '1981-06-15'),
the CREATE TABLE statement that inserts the following
movies:


, Raiders of the Lost Ark PG June 15, 1981
('The Godfather', 'R', '1972-03-24'),
The Godfather R March 24, 1972
('The Pursuit of Happyness', 'PG-13', '2006-12-15');
The Pursuit of Happyness PG-13 December 15, 2006
CREATE TABLE Album (
ID INT,
Title VARCHAR(60),
1.10.6 ReleaseYear INT,
Modify the two CREATE TABLE statements: PRIMARY KEY (ID)
Add a primary key constraint to the Album table's ID col- );
umn. CREATE TABLE Song (
Add a primary key constraint to the Song table's ID col- ID INT,
umn. Title VARCHAR(60),
Add a foreign key constraint to the Song table so the Artist VARCHAR(60),
AlbumID column refers to the Album table's ID column. AlbumID INT,
PRIMARY KEY (ID),
FOREIGN KEY (AlbumID) REFERENCES Album(ID)
);
2.1.4
Modify the SELECT statement to select movies with the
word 'star' somewhere in the title. SELECT * FROM Movie
Run your solution and verify the result table shows just the WHERE Title LIKE '%star%';
movies
Rogue One: A Star Wars Story, Star Trek and Stargate.
2.2.3
Using the YEAR() and MONTH() functions, modify the 223SELECT * FROM Movie Where YEAR(ReleaseDate) >
SELECT statement to select movies that are released after 2017 OR MONTH (ReleaseDate) = 11;
2017 or in November.
2.3.6 The given SQL creates a Song table and inserts some
songs. The SELECT statement selects the genre and row
count for each genre group.
Add a new column to the SELECT statement that uses

MAX() to find the most recent release year for each genre.

Written for

Institution
WGU D427
Course
WGU D427

Document information

Uploaded on
September 30, 2025
Number of pages
21
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
MGRADES Stanford University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1260
Member since
2 year
Number of followers
103
Documents
74857
Last sold
21 hours ago
MGRADES (Genius Brains)

Welcome to MGRADES Exams, practices and Study materials The work speaks for itself Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3.8

200 reviews

5
85
4
35
3
50
2
11
1
19

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions