33/36
33/36 that's 92% RETAKE
33 questions were answered correctly.
3 questions were answered incorrectly.
1
In each milestone, you may want or need to use the database
and query tool to answer some of the questions. We suggest you
open the tool in another browser tab while you are working on
this assessment.
https://postgres.sophia.org/
Identify the correctly constructed ALTER TABLE statement to
add a UNIQUE constraint to the column reference_number with
the constraint name reference_number_unique on the table
called 'document'.
ALTER TABLE document ADD
CONSTRAINT reference_number
UNIQUE (reference_number);
ALTER TABLE document ADD
CONSTRAINT
reference_number_unique
UNIQUE (reference_number);
ALTER TABLE document ADD
UNIQUE reference_number
, CONSTRAINT
UNIT 1(reference_number_unique);
— MILESTONE 1
33/36
ALTER TABLE document ADD
CONSTRAINT reference_number
UNIQUE
(reference_number_unique);
RATIONALE
Common mistakes with adding the UNIQUE constraint to an
existing column include not having ( ) around the column names,
omitting the keyword UNIQUE, incorrectly spelling the column
name, and not including the constraint name.
CONCEPT
UNIQUE to Validate Data
Report an issue with this question
2
In each milestone, you may want or need to use the database
and query tool to answer some of the questions. We suggest you
open the tool in another browser tab while you are working on
this assessment.
https://postgres.sophia.org/
Using the SELECT statement, query the track table to find the
total cost of the tracks on album_id 5, rounded to the nearest
dollar.
14
, UNIT
114.9
— MILESTONE 1
33/36
14.85
15
RATIONALE
Common mistakes when using the ROUND function include not
selecting the right column, not including the precision level,
omitting the ( ) around the column/function, and failing to add in the
filter conditions.
CONCEPT
ROUND to Round Numbers
Report an issue with this question
3
In each milestone, you may want or need to use the database
and query tool to answer some of the questions. We suggest you
open the tool in another browser tab while you are working on
this assessment.
https://postgres.sophia.org/
Using the AND or OR statement, filter the employee table for
employees who live in the city Lethbridge or have IT within their
title.
Identify the first name of the 2nd record.
Michael
, UNIT 1Robert
— MILESTONE 1
33/36
Laura
King
RATIONALE
Common mistakes include using the = instead of LIKE when
utilizing wild cards, filtering the wrong column of data, using the
wrong data table, omitting the single quotes around the data, and
forgetting to include the wild cards in all parts of the string rather
than just on one end. Another common mistake when using the
AND and OR statements is selecting the incorrect option; the AND
operator should be used when both conditions need to apply
whereas the OR operator should be used when only one condition
of the two should apply.
CONCEPT
Multiple Filters
Report an issue with this question
4
In each milestone, you may want or need to use the database
and query tool to answer some of the questions. We suggest you
open the tool in another browser tab while you are working on
this assessment.
https://postgres.sophia.org/
Using the WHERE clause, filter the employee table to include
individuals that report to Andrew Adams, who has an
employee_id of 1.
Identify the title of the 2nd individual listed.