I have the following table in my database. Now what I want to find out is the total sum amount that are associated with dates before 04-01-2012 from the field "amount".
id Date Amount
1 02-01-2012 500
2 03-01-2012 500
3 04-01-2012 500
4 25-01-2012 500
5 10-02-2012 500
6 21-03-2012 500
If I calculate it manually then the result would be: 500( Date: 02-01-2012)+ 500 (Date: 03-01-2012)= 1000.
Would you please kindly help me with the mysql query?
Thanks in Advance :)