Sophia __ Welcome milestone 1 test
.pdf
keyboard_arrow_up
School
Southern New Hampshire University *
*We aren’t endorsed by this school
Course
CS-210
Subject
Information Systems
Date
Feb 20, 2024
Type
Pages
42
Uploaded by Matthewdbills
1
31/36
that's 86%
RETAKE
31 questions were answered correctly
.
5 questions were answered incorrectly
.
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 ordered by
the track_id. Set the LIMIT to 8 and OFFSET to 40.
What is the name of the last row returned?
RATIONALE
●
●
Hand In My Pocket
Not The Doctor
●
Ironic
●
Right Through You
UNIT 1 — MILESTONE 1
31/36
CONCEPT
→
LIMIT and OFFSET to Cap Results
2
Common mistakes with the LIMIT and OFFSET clauses include
mixing up the two, not using the ORDER BY clause to enforce a
predictable result set, and not using the rows skipped using
OFFSET.
Report an issue with this question
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 that
removes the age column from the user table.
RATIONALE
●
●
ALTER TABLE user DROP
age_now;
●
ALTER TABLE user ADD age int;
ALTER TABLE user DROP age;
●
ALTER TABLE user DROP age int;
UNIT 1 — MILESTONE 1
31/36
CONCEPT
→
ALTER TABLE to Change Columns: Add/Drop
3
Common mistakes when adding or dropping a column include
incorrectly naming the table or column names, not including
the data type and size when adding a column, and using the
incorrect syntax structure of the ALTER TABLE command.
Report an issue with this question
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 LIKE operator in the WHERE clause, filter the customer
table to list the individuals that have a phone number ending with
88.
Identify the 2nd individual's country.
RATIONALE
●
●
Toronto
●
USA
●
India
Canada
UNIT 1 — MILESTONE 1
31/36
4
Common mistakes when using the LIKE operator are filtering
the wrong column of data, using the wrong data table, omitting
the single quotes around the data, and forgetting to include the
wild card % in the correct location of the LIKE operator.
Report an issue with this question
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/
Given the employee table and the data that it contains, and
assuming that you have the rights to modify the table, which of
the following ALTER TABLE statements would create an error?
●
●
ALTER TABLE employee ALTER
COLUMN city TYPE VARCHAR
(100);
ALTER TABLE employee ALTER
COLUMN employee_id TYPE
VARCHAR (50);
●
ALTER TABLE employee ALTER
COLUMN postal_code TYPE
VARCHAR (100);
UNIT 1 — MILESTONE 1
31/36
CONCEPT
→
ALTER TABLE to Change Columns: Data Characteristics
5
RATIONALE
Common mistakes when modifying the data type of a column
include: not casting the variables if needed; not including the
table and column names to change; the column being a
primary or foreign key; and failing to consider the error
messages that may occur when converting the existing data in
the table.
Report an issue with this question
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 GROUP BY and HAVING clauses, filter the customer
table by country.
How many countries have more than 3 customers?
●
●
ALTER TABLE employee ALTER
COLUMN email TYPE VARCHAR
(100);
5
UNIT 1 — MILESTONE 1
31/36
CONCEPT
→
HAVING to Filter On Aggregates
6
RATIONALE
Common mistakes when using the HAVING clause with the
GROUP BY clause in a SELECT statement include: not using
aggregate functions in the SELECT clause; not including each
column in the SELECT clause in the GROUP BY clause; using
the incorrect aggregate function; and incorrectly including the
filter in the WHERE clause instead of the HAVING clause.
Report an issue with this question
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 IN operator, filter the album table to find those with the
artist ID set to 8, 17, 22, or 3.
Identify the title of the 4th record.
●
●
18
●
7
●
6
UNIT 1 — MILESTONE 1
31/36
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help