Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Thesis

MOTIVACION

Rating
-
Sold
-
Pages
4
Grade
A+
Uploaded on
04-12-2024
Written in
2024/2025

TRABAJO DE INVESTIGACION

Institution
Course

Content preview

Pregunta 1

Respuesta:

Canciones más vendidas en 2009: Identificar las canciones con más ventas (en cantidad de tracks).
Especificar nombre de la canción, autor, género y cantidad de ventas.

Consulta SQL:

SELECT track.Name AS Cancion, artist.Name AS Autor, genre.Name AS Genero,
COUNT(invoice_line.TrackId) AS Ventas

FROM invoice_line

JOIN track ON invoice_line.TrackId = track.TrackId

JOIN album ON track.AlbumId = album.AlbumId

JOIN artist ON album.ArtistId = artist.ArtistId

JOIN genre ON track.GenreId = genre.GenreId

WHERE YEAR(invoice.InvoiceDate) = 2009

GROUP BY track.Name, artist.Name, genre.Name

ORDER BY Ventas DESC;



Pregunta 2

Respuesta:

3 clientes con más compras en 2010: Obtener los nombres completos, cantidad de tracks y monto
gastado de los 3 clientes que más compraron.

Consulta SQL:

SELECT customer.FirstName || ' ' || customer.LastName AS Nombre_Cliente,
COUNT(invoice_line.TrackId) AS Tracks_Comprados, SUM(invoice_line.UnitPrice) AS
Monto_Gastado

FROM invoice

JOIN invoice_line ON invoice.InvoiceId = invoice_line.InvoiceId

JOIN customer ON invoice.CustomerId = customer.CustomerId

WHERE YEAR(invoice.InvoiceDate) = 2010

GROUP BY Nombre_Cliente

ORDER BY Tracks_Comprados DESC

LIMIT 3;

Written for

Institution
Course

Document information

Uploaded on
December 4, 2024
Number of pages
4
Written in
2024/2025
Type
THESIS
Supervisor(s)
Garcia
Year
Unknown

Subjects

$20.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
kenyigs95

Get to know the seller

Seller avatar
kenyigs95 INGENIERO
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
4
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions