Here is my data
cardNo| userName| tablename| hours | date 1 | a | a | 12 | 12-06-2015 1 | a | a | 5 | 11-06-2015 2
SELECT cardNo,userName, tablename, sum(hours) hours FROM Table_1 GROUP BY cardNo,userName,tablename
It's simple SUM() with GROUP BY:
SUM()
GROUP BY
SELECT cardNo,sum(hours) FROM yourtable GROUP BY cardNo;
I left it as an exercise for the OP to include userName and tablename columns into the query