SQL: Select order number, order date and the purchase amount for each order which will be delivered by a specified salesman
SQL Basic Select Statement : Exercise-11 with Solution.
Write a sql query to display the order number followed by order date and the purchase amount for each order which will be delivered by the salesman who is holding the ID 5001.
Sample table: orders
SELECT ord_no, ord_date, purch_amt FROM orders WHERE salesman_id=5001;
Output of the Query:
ord_no ord_date purch_amt 70002 2012-10-05 65.26 70005 2012-07-27 2400.60 70008 2012-09-10 5760.00 70013 2012-04-25 3045.60
Pictorial presentation :
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?