Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select *
- from customers c, invoices i, shipment_info si
- where c.customer_id = i.customer_id
- and i.amount > 999.99
- and i.invoice_id = si.invoice_id(+) -- added to show how outer joins can be supported in this style
- order by i.amount, c.name
- SELECT *
- FROM customers c, invoices i, addresses a
- WHERE c.customer_id = i.customer_id
- AND i.amount > 999.99
- ORDER BY i.amount, c.name
- SELECT *
- FROM numbers
- JOIN letters
- ON 1=1
- Select c.name, Sum(d.Amount)
- From customer c
- Left Join Invoice I
- On i.custId = c.custId
- And i.SalesDate Between '8/1/2009'
- and '8/31/2009 23:59:59'
- And i.ProcessDate Is Not Null
- Left Join InvoiceDetails d
- On d.InvoiceId = i.InvoiceId
- And d.Product = 'widget'
- Group By c.Name
Add Comment
Please, Sign In to add comment