List:General Discussion« Previous MessageNext Message »
From:Scott Haneda Date:April 30 2003 1:28am
Subject:Select as sum() all records of today
View as plain text  
I have the following table transaction
+------------+---------------+------+-----+---------+----------------+
| Field      | Type          | Null | Key | Default | Extra          |
+------------+---------------+------+-----+---------+----------------+
| id         | int(11)       |      | PRI | NULL    | auto_increment |
| user_id    | int(11)       |      |     | 0       |                |
| amount     | decimal(6,2)  |      |     | 0.00    |                |
| trans_type | varchar(12)   |      |     |         |                |
| error      | varchar(80)   |      |     |         |                |
| added      | timestamp(14) | YES  |     | NULL    |                |
+------------+---------------+------+-----+---------+----------------+

I need to do a
Select SUM(amount) from transaction WHERE added ..... Is in todays data
range.  Can someone help me with this one, thanks.

-------------------------------------------------------------
Scott Haneda                                Tel: 415.898.2602
http://www.newgeo.com                       Fax: 313.557.5052
scott@stripped                            Novato, CA U.S.A.

Thread
Installation QuestionSpenser E30 Apr
  • Select as sum() all records of todayScott Haneda30 Apr
    • Re: Select as sum() all records of todayScott Haneda30 Apr
      • Re: Select as sum() all records of todayPaul DuBois30 Apr
  • Re: Installation QuestionDan Crites30 Apr
RE: Select as sum() all records of todayLeong Jern-Kuan30 Apr
Re: Select as sum() all records of todayScott Haneda30 Apr
RE: Select as sum() all records of todayLeong Jern-Kuan30 Apr