Latest Questions And Answers
, lOMoAR cPSD| 7670600
1●
For this question, use the PostgreSQL database for this course.
Suppose you need to write a statement that shows the track name
and milliseconds from the track table and the playlist_id from the
playlist_track table. It should use an ON clause to specify that the
tables should be JOINed by their track_id columns.
Which of these statements matches those requirements?
LAUNCH DATABAS E
SELECT name, milliseconds, pla
FROM track
● JOIN playlist_track
ON (track.track_id = playlist_
SELECT name, milliseconds, pla
FROM track
JOIN playlist_track
, 20 /25
lOMoAR cPSD| 7670600
UNIT 4 — MILESTONE 4ON track.track_id =
playlist_t
SELECT name, milliseconds, pla
FROM track
●
JOIN ON track.track_id = playl
SELECT name, milliseconds, pla
FROM track
● JOIN playlist_track
USING track.track_id = playlis
RATIONALE
The correct syntax for this query is as follows:
SELECT <columnlist>
FROM <table1>
JOIN <table2> ON <table1column> = <table2column>
No parentheses are used in any part of this statement. The JOIN
clause requires a table name. The statement should use ON, not
USING.
, 20 /25
lOMoAR cPSD| 7670600
UNIT 4 — MILESTONE 4
CONCEPT
→ JOIN ON to Link Tables
Report an issue with this question
2●
For this question, refer to the schema of the PostgreSQL database
for this course as needed.
Which of the following is a valid relationship in this database?
PK means primary key; FK means foreign key.
invoice table, customer_id column
(PK)
to
●
customer table, customer_id column
(FK)
customer table, customer_id column
(PK)
to
invoice table, customer_id column
(FK)