-- ACTIVIDAD 1

-- 1
SELECT Name FROM Track
WHERE MediaTypeId = (SELECT MediaTypeId FROM MediaType WHERE Name = 'Protected AAC audio file');

-- 2
SELECT Name FROM Track
WHERE MediaTypeId IN (SELECT MediaTypeId FROM MediaType WHERE Name LIKE '%AAC%');

-- 3
-- 2 minutos = 120000 milisegundos
SELECT Name FROM Track
WHERE Milliseconds > 120000;

-- 4
SELECT Name FROM Track
WHERE GenreId = (SELECT GenreId FROM Genre WHERE Name = 'Jazz');

-- 5
SELECT Name, Bytes
FROM Track
ORDER BY Bytes DESC
LIMIT 1;

-- Pro 1
SELECT COUNT(*) AS TotalAlbumes
FROM Album
WHERE ArtistId = (SELECT ArtistId FROM Artist WHERE Name = 'Led Zeppelin');

-- Pro 2
SELECT SUM(UnitPrice) AS PrecioTotal
FROM Track
WHERE AlbumId = (SELECT AlbumId FROM Album WHERE Title = 'Houses Of The Holy');
