Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select customer_name
- ,customer_state
- (Select Count (*) AS orders
- FROM Orders
- Where Orders.customer_id = Customer.customer_id) AS orders
- From customers
- Order By Customer_name
- Select FirstName
- ,State
- (Select Count (*) As invoices
- From invoices
- Where invoices.CustomerId = customers.CustomerId) As Orders
- From Customers
- Order by Firstname
Add Comment
Please, Sign In to add comment