Advertisement
Guest User

Untitled

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