[thechat] Microsoft Access 97 Query

rudy rudy937 at rogers.com
Wed Jun 5 10:02:01 CDT 2002


> I have table containing listing some CD's and their prices.
> Now I want to create a query which could sum up the prices
> of those CD's and give the total amount.

hi syed

wrong list   ;o)

your answer below the anti-tip

<tip type="quatsch">
Jim Romenesko's Obscure Store and Reading Room
http://www.obscurestore.com/
</tip>

okay, syed, here's how to get the total prices of all the cds

   select sum(cdprice) from cdtable

if you want the total prices of only some of the cds

   select sum(cdprice) from cdtable
          where cdtype="country and western"

if you want the average price by type

   select cdtype, sum(cdprice) from cdtable
       group by cdtype

i could go on, but that should get you started

check the help file again under "aggregate functions"

or try a tutorial
here --http://mis.bus.sfu.ca/tutorials/MSAccess/tutorials_main.asp

also, The Access Web (http://www.mvps.org/access/) is pretty good but might
not be best to learn from

rudy
http://rudy.ca/




More information about the thechat mailing list