Try this:
Here you need to get amount Student wise, so need to do GROUP BY
student & also want sum amount, so need to call SUM
function and pass amount in it.
Here is MySQL Query:
SELECT std_id AS studentid , SUM(pay) as Amount
FROM table
GROUP BY std_id;
Let me know if you need further help.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…