Thank you for your input. I will try this and see what happens. Again,
I am a very ignorant neophyte, but might be able to get this going.
:o) Your help is appreciated!

Suzi


--- In [email protected], James Keeline <[EMAIL PROTECTED]> wrote:
>
> --- suzithepid <[EMAIL PROTECTED]> wrote:
> 
> > I have a real estate site where I input house listings and their data.
> > One of the fields in the MySQL database is called "sale_price." The
> > realtor wants me to place a running total at the top of the page of
> > all the sale prices. I am sure this is a simple thing to do, but being
> > a neophyte, it totally baffles me. Can someone show me what to do
here?
> > 
> > Thanks-
> > Suzi
> 
> SELECT SUM(sale_price) AS Total FROM table_name;
> 
> You may want a WHERE clause to limit which rows are consulted, etc.
 SUM() is
> one of the "aggregate functions" for MySQL and others include MIN(),
MAX() and
> AVG().  With the MIN() and MAX() and some arithmetic you could get a
median of
> the houses listed (different than sold, of course).
> 
> James Keeline
>


Reply via email to