Screen Link:
My Code:
SELECT invoice_id, customer_id, invoice_date, billing_country, SUM(total) AS total
FROM invoice
GROUP BY billing_country
HAVING SUM(total) > (SELECT AVG(total)*10 AS ten_times_average
FROM invoice)
ORDER BY total DESC
What I expected to happen:
The instructions said that I should’ve had access
to code that has already been writtten.
However, that doesn’t exist
What actually happened:
Is incorrect because:
The table calculated by the query is not correct.