As an example, there is a table that has Sales Reps and their sales listed in a table. Two of the rep ID’s are for the same Rep, so I need to be able to combine these two rows into one in a query while still displaying the rest of the rows. Whether this is done in the SQL query, or in PHP either way would work.
So here is what the table would look like:
ID Sales
100 $5
101 $10
102 $2
500 $3
I need it to output like this:
ID Sales
100 $8
101 $10
102 $2
Where ID 100’s sales is a sum of both 100 and 500.
I’m sure this can’t be too hard, but I’m not that familiar with SQL or PHP yet, trying to learn though. Thank you.
use two separate query then union