-- ACTIVIDAD 1

-- 1
SELECT
    Invoice.InvoiceId,
    Customer.FirstName || ' ' || Customer.LastName AS NombreCliente,
    Invoice.BillingCountry
FROM Invoice
JOIN Customer ON Invoice.CustomerId = Customer.CustomerId;

-- 2
SELECT
    Invoice.InvoiceId,
    Customer.FirstName || ' ' || Customer.LastName AS NombreCliente,
    Invoice.BillingCountry,
    Invoice.Total
FROM Invoice
JOIN Customer ON Invoice.CustomerId = Customer.CustomerId
ORDER BY Invoice.Total DESC;

-- 3
SELECT BillingCountry, SUM(Total) AS TotalFacturado
FROM Invoice
GROUP BY BillingCountry
ORDER BY TotalFacturado DESC
LIMIT 1;
