Comment on Rollup for multiple fields in MySQLComments−lazyfunctor13yI am not sure if I get your question. I think this query should work"select country, state, city, SUM(sales), SUM(profit) from foo group by country, state, city with rollup;"for a table with country, state, city, sales, profit as columns−sGrabberOP13yThanks. Had tried this way taking multiple fields but it didnt work. Will try again and update you. Once again thanks for the inputs, really appreciate
Comments
I am not sure if I get your question. I think this query should work
"select country, state, city, SUM(sales), SUM(profit) from foo group by country, state, city with rollup;"
for a table with country, state, city, sales, profit as columns
Thanks. Had tried this way taking multiple fields but it didnt work. Will try again and update you. Once again thanks for the inputs, really appreciate