Advertisement
Guest User

Untitled

a guest
Apr 4th, 2020
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.24 KB | None | 0 0
  1. SELECT
  2.     invoices.InvoiceId, SUM(UnitPrice * Quantity)
  3. FROM
  4.     invoices
  5.     INNER JOIN invoice_items ON invoice_items.InvoiceId = invoices.InvoiceId
  6. WHERE
  7.     BillingCountry LIKE 'Poland'
  8. GROUP BY
  9.     invoices.InvoiceId
  10. HAVING
  11.     COUNT(*)>5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement