w3resource
SQL exercises

SQL Subquery Exercises: Display all the customers with orders issued on date 17th August, 2012

SQL SUBQUERY: Exercise-10 with Solution

10. Write a query to display all the customers with orders issued on date 17th August, 2012.

Sample table: Orders


Sample table: Customer


Sample Solution:

SELECT b.*, a.cust_name
FROM orders b, customer a
WHERE a.customer_id=b.customer_id
AND b.ord_date='2012-08-17';

Sample Output:

ord_no	purch_amt	ord_date	customer_id	salesman_id	cust_name
70004	110.50		2012-08-17	3009		5003		Geoff Cameron
70011	75.29		2012-08-17	3003		5007		Jozy Altidor

Explanation:

SQL Subqueries: Display all the customers with orders issued on  date 17th August, 2012.

Practice Online


Inventory database model

Query Visualization:

Duration:

Query visualization of Display all the customers with orders issued on date 17th August, 2012 - Duration

Rows:

Query visualization of Display all the customers with orders issued on date 17th August, 2012 - Rows

Cost:

Query visualization of Display all the customers with orders issued on date 17th August, 2012 - Cost

Contribute your code and comments through Disqus.

Previous: Write a query to display all customers with orders on October 5, 2012.
Next: Write a query to find the name and numbers of all salesmen who had more than one customer.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming