Title | Practice Quiz - semana 3 |
---|---|
Author | Anonymous User |
Course | Psychometric and abstract reasoning |
Institution | Universitas Tri Tunggal |
Pages | 6 |
File Size | 517.2 KB |
File Type | |
Total Downloads | 33 |
Total Views | 134 |
Rtejsjsks...
26/8/2021
Practice Quiz - Writing Queries | Coursera
Practice Quiz - Writing Queries PUNTOS TOTALES DE 5
1. All of the questions in this
1/1punto
quiz pull from the open source Chinook Database. Please refer to the ER Diagram below and familiarize yourself with the table and column names to write accurate queries and get the appropriate answers.
How many albums does the artist Led Zeppelin have?
https://www.coursera.org/learn/sql-for-data-science/quiz/KddLO/practice-quiz-writing-queries/attempt?redirectToCover=true
1/6
26/8/2021
Practice Quiz - Writing Queries | Coursera
1 2 3
SELECT COUNT(Albumid) AS totalAlbums FROM albums Ejecutar WHERE Artistid = (SELECT Artistid FROM artists WHERE name = 'Led Zeppelin') Restablecer
+-------------+ | totalAlbums | +-------------+ | 14 | +-------------+
14
Correcto
2. All of the questions in this
1/1punto
quiz pull from the open source Chinook Database. Please refer to the ER Diagram below and familiarize yourself with the table and column names to write accurate queries and get the appropriate answers.
Create a list of album titles and the unit prices for the artist "Audioslave".
https://www.coursera.org/learn/sql-for-data-science/quiz/KddLO/practice-quiz-writing-queries/attempt?redirectToCover=true
2/6
26/8/2021
Practice Quiz - Writing Queries | Coursera
1 2 3 4 5 6
SELECT n.Name, u.UnitPrice FROM ((albums t INNER JOIN artists n ON t.Artistid = n.Artistid) INNER JOIN tracks u ON t.Albumid = u.Albumid) WHERE n.Name = 'Audioslave'
Ejecutar Restablecer
+------------+-----------+ | Name | UnitPrice | +------------+-----------+ | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | | Audioslave | 0.99 | +------------+-----------+ (Output limit exceeded, 25 of 40 total rows shown)
How many records are returned? Only 25 records will be shown in the output so please look at the bottom of the output to see how many records were retrieved.
40
Correcto
3. All of the questions in this
1/1punto
quiz pull from the open source Chinook Database. Please refer to the ER Diagram below and familiarize yourself with the table and column names to write accurate queries and get the appropriate answers.
https://www.coursera.org/learn/sql-for-data-science/quiz/KddLO/practice-quiz-writing-queries/attempt?redirectToCover=true
3/6
26/8/2021
Practice Quiz - Writing Queries | Coursera
Find the first and last name of any customer who does not have an invoice. Are there any customers returned from the query? 1 2 3 4
SELECT n.FirstName, n.LastName, i.Invoiceid FROM customers n LEFT JOIN invoices i ON n.Customerid = i.Customerid WHERE InvoiceId IS NULL
Ejecutar Restablecer
+-----------+----------+-----------+ | FirstName | LastName | InvoiceId | +-----------+----------+-----------+ +-----------+----------+-----------+ (Zero rows)
Yes No https://www.coursera.org/learn/sql-for-data-science/quiz/KddLO/practice-quiz-writing-queries/attempt?redirectToCover=true
4/6
26/8/2021
Practice Quiz - Writing Queries | Coursera
Correcto
4. All of the questions in this
1/1punto
quiz pull from the open source Chinook Database. Please refer to the ER Diagram below and familiarize yourself with the table and column names to write accurate queries and get the appropriate answers.
Find the total price for each album. 1 2 3 4 5
SELECT t.Title, SUM(p.UnitPrice) FROM albums t INNER JOIN tracks p ON t.Albumid = p.Albumid WHERE t.Title = 'Big Ones' GROUP BY t.Title
Ejecutar Restablecer
+----------+------------------+ | Title | SUM(p.UnitPrice) | +----------+------------------+ | Big Ones | 14.85 | +----------+------------------+
What is the total price for the album “Big Ones”?
14.85
Correcto
https://www.coursera.org/learn/sql-for-data-science/quiz/KddLO/practice-quiz-writing-queries/attempt?redirectToCover=true
5/6
26/8/2021
Practice Quiz - Writing Queries | Coursera
5. All of the questions in this
1/1punto
quiz pull from the open source Chinook Database. Please refer to the ER Diagram below and familiarize yourself with the table and column names to write accurate queries and get the appropriate answers.
How many records are created when you apply a Cartesian join to the invoice and invoice items table? 1 2
SELECT count(*)total FROM invoices a CROSS JOIN invoice_items b; Ejecutar Restablecer
+--------+ | total | +--------+ | 922880 | +--------+
Only 25 records will be shown in the output so please look at the bottom of the output to see how many records were retrieved.
922880
Correcto
https://www.coursera.org/learn/sql-for-data-science/quiz/KddLO/practice-quiz-writing-queries/attempt?redirectToCover=true
6/6...