SQL Queries Practice & Solutions

Solve following queries using aggregate functions for the table.

Table: sales (orderID OrderDate OrderPrice OrderQuantity CustomerName)


1.Count how many orders have made a customer with customer name of Smith.


2.Find the number of unique customers that have ordered from the store.


3.Find out total no. of items ordered by all the customers.


4.Find out the average number of items per order.


5.Find out the average order quantity for all orders with order price greater than 200.


6.Find out what was the minimum price paid for any of the orders.


7.Find out the highest order price from the given sales table.


8.List out unique customers name only from the table.


9.List out the name of the customers who have given an order in the month of DECEMBER.


10.Find out the total amount of money spent for each of the customers.


11. Select all unique customers, who have spent more than 1200 in the store.


Now I had updated my table and inserted more values in it.


12.Select all the customers that have ordered more than 5 items in total from all their orders.


13.Select all customers who have spent more than 1000, after 10/01/2005.


14.Select orders in increasing order of order price.


15 Select orders in decreasing order of order price.


Thank You, Like, Share, Subscribe.

100 Most Important Abbreviations Of Information & Communication Technology ( ICT )

100 Most Important Abbreviations Of  Information & Communication Technology, ICT.

To Get FREE Pdf Click Here Or Download From -> GENERAL Abbreviations 


                      Watch Full Lecture On Youtube:-


OSI Model (Open System Interconnection) Networking Model

OSI Model Stands For Open System Interconnection Model Which Is Consists Of Seven Layers.

  1. Physical layer
  2. Data Link Layer
  3. Network Layer
  4. Transport Layer
  5. Session Layer
  6. Presentation layer
  7. Application Layer

All Layers Have Their Own Functions And Responsibilities. For Getting Into Details Watch The Video Given In Link Below.

Complete OSI Model Watch Here.


For Getting Complete Lecture In PDF Format. Comment OSI Model On Video.