This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: have been entered? SELECT state, count(*) FROM demo_customer, demo_sales_order WHERE demo_sales_order.customer_id = demo_customer.customer_id GROUP BY demo_customer.state 4. Identify the salesperson on record for each customer. Include the job function for the salesperson. SELECT name, city, salesperson_id, last_name, job_function FROM demo_customer, demo_employee, demo_job WHERE salesperson_id = employee_id and demo_employee.job_id = demo_job.job_id; 5. List the credit limit, total value of all orders, and the earliest and the latest ship date for each customer. SELECT demo_customer.customer_id, credit_limit, sum(total), min(ship_date), max(ship_date) FROM demo_customer, demo_sales_order WHERE demo_customer.customer_id = demo_sales_order.customer_id GROUP BY demo_customer.customer_id, credit_limit;...
View Full Document
- Summer '08
- Sales, Consultative selling, Microsoft SQL Server