Projet Name Nature Amount
Project1 infra 100
Project1 noninfra 200
Project2 infra 500
I want to group by project name in my while loop, display project name once if has more than 1
and sum the amount of all records with the same project name. How will i do that ?
SELECT project_name, SUM(amount) AS total FROM tblProjects GROUP BY project_name
The result should be like this:
Code:
project_name total
Project1 300
Project2 500
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video) My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet Social Group:VBForums - Developers from India