Guest User

Untitled

a guest
Apr 25th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. Select *
  2. from customers c, invoices i, shipment_info si
  3. where c.customer_id = i.customer_id
  4. and i.amount > 999.99
  5. and i.invoice_id = si.invoice_id(+) -- added to show how outer joins can be supported in this style
  6. order by i.amount, c.name
  7.  
  8. SELECT *
  9. FROM customers c, invoices i, addresses a
  10. WHERE c.customer_id = i.customer_id
  11. AND i.amount > 999.99
  12. ORDER BY i.amount, c.name
  13.  
  14. SELECT *
  15. FROM numbers
  16. JOIN letters
  17. ON 1=1
  18.  
  19. Select c.name, Sum(d.Amount)
  20. From customer c
  21. Left Join Invoice I
  22. On i.custId = c.custId
  23. And i.SalesDate Between '8/1/2009'
  24. and '8/31/2009 23:59:59'
  25. And i.ProcessDate Is Not Null
  26. Left Join InvoiceDetails d
  27. On d.InvoiceId = i.InvoiceId
  28. And d.Product = 'widget'
  29. Group By c.Name
Add Comment
Please, Sign In to add comment