Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- invoices.InvoiceId, SUM(UnitPrice * Quantity)
- FROM
- invoices
- INNER JOIN invoice_items ON invoice_items.InvoiceId = invoices.InvoiceId
- WHERE
- BillingCountry LIKE 'Poland'
- GROUP BY
- invoices.InvoiceId
- HAVING
- COUNT(*)>5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement