Jump to content

SQL Avg Help


1nstan7

Recommended Posts

http://www.w3schools.com/sql/sql_func_avg.asp

 

The example they show is

SELECT AVG(Price) AS PriceAverage FROM Products;

 

 

They did AVG(price) which gets the price but then they have "PriceAverage". Is that a new varible?

 

My example table called "purchase":

Car price purchase Date

smcar £10 01/12/2014

smfar £20 03/12/2014

 

In my case will this be "SELECT AVG(price) as PriceAverage FROM purchase" ?

 

If so how would I do this and show only purchases after 02/12/2014?

Edited by 1nstan7
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...