Can you write down SQL statement that selects the total number of - ProProfs Discuss
Advertisement

Can you write down SQL statement that selects the total number of orders from the Sales table?

Can you write down SQL statement that selects the total number of orders from the Sales table?<br/>

Change Image    Delete

Asked by Cerebralrust, Last updated: Nov 09, 2024

+ Answer
Request
Question menu
Vote up Vote down

3 Answers

Danny R. Glover

Danny R. Glover

Danny R. Glover
Danny R. Glover, Editor, New York City

Answered Jul 11, 2018

Take note that you want to gather information about the total number of orders. This means that you need to choose the select count from sales which is letter B in the choices. This will allow you to select all of the orders that you may need to highlight or check.

This is a very helpful command when you want to check if all of the orders are accounted for or if you did not miss any order from the ones that you have already input. You will use select AVG from sales if you want to know more about the average of the sales you have received for a certain time period. You will use Select SUM from sales if you want to know the amount that you made based on the number of sales.

upvote downvote
Reply 

Chris Kenway

Chris Kenway

Chris Kenway
Chris Kenway, Content Writer, Jacksonville

Answered Jun 27, 2018

If you would like to get the total number of order from the sales table, you need to use the formula SELECT COUNT * from SALES. This will help you figure out which are the orders out of all the other details that will also be included in the table. If you would be getting the sum, this might mean that you are getting the total amount that you have acquired based on the items that you were able to sell.

You need to be familiar with the different formulas because if you would not know what to do, you may end up making wrong computations that will affect the report that you are creating for the rest of your team. When it comes to business, you cannot afford to make mistakes.

upvote downvote
Reply 

John Smith

John Smith

John Smith
John Smith

Answered Mar 14, 2017

SELECT COUNT(*) FROM Sales
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.