For each title during my table I must summarize the amount that seems beside each reputation for each title.
The column names are au_fname, au_lname, and qty
Here's what the table appears like
Johnson White 5 Marjorie Green 5 Cheryl Carson 5 Michael O'Leary 5 Dean Straight 5 Meander Smith 5 Abraham Bennet 5 Ann Dull 5 Burt Gringlesby 5 Charlene Locksley 5 Morningstar Greene 5 Reginald Blotchet-Halls 5 Akiko Yokomoto 5 Innes del Castillo 5 Michel DeFrance 5 Dirk Stringer 5 Stearns MacFeather 5 Livia Karsen 5 Sylvia Panteley 5 Sheryl Hunter 5
Certain names repeat multiple occasions.
Essentially you have to group by au_fname and au_lname, then make use of the SUM(qty) aggregate to obtain the way to go. Below is when you'd get it done.
SELECT au_fname, au_lname SUM(qty) FROM yourTableName GROUP BY au_fname, au_lname
It is possible to
personID just in case you will find a couple named John Cruz?
Otherwise, you should use
Select au_fname, au_lname, sum(qty) as sum_qty from table group by au_fname, au_lname
really bad there is not a personID, however, you use that which you have.
Just a little better could be:
Select au_lname + ', ' + au_fname