I have a DB with which I am running the below command. The aim is to show the HOURS field from each ROW where the DATE is equal to 02/08/2013. What I then want to do it to add the results and display as a total amount.
SELECT HOURS FROM RESOURCE WHERE DATE = '02/08/2013';
Current the results is 20 40 18. What I want is to output the total 78.
I have tried the below, but that just counts the results, 3.
SELECT COUNT(HOURS) FROM RESOURCE WHERE DATE = '02/08/2013'
Any suggestions are appreciated.
You can use,
SQL FIDDLE OUTPUT