I have a table with four fields: ID auto increment, a string, and two integers.
I want to do something of the sort:
select count(*) from table group by string
and then use the result to consolidate all counts which are larger than 1.
That is, take all rows which have count larger than 1, and replace all of these rows in the database (which have the same string) with a single row, ID does not matter, and the two integers are the sum over all rows of all of the rows with count larger than 1.
Is that possible using a few simple queries?
Thanks.
If you can stop the table from being updated by other users, then it’s pretty easy.