how do I get extra fields with in a column with calculations I have a table AR--X with columns as Region, Product type, pofit, Target, 1, 2, 3,....... till 31 ( days ) as columns.

In Product type Column, there are fields like  Electronic, Plastic, wood, other, xx.

Now I want:

Select region, product type, profit, 1,2... 31 from AR--X.


In the results I would like to see:

for Product type with extra fields with calculations 


a Field with a name as 'extra' = Target - (Electronic+ Plastic+ wood +other+ xx )
a Field with a name as 'Total'= Sum(Electronic+ Plastic+ wood +other + xx )
a Field with a name as '% of total' = total/Target*100.


Is this possible?
Generated columns(MySQL/MariaDB) make these fields possible.

Depending on what you are doing the 1-31 columns for days may not make sense. It will be hard to do partial month retrievals. Your queries appear to be month totals so it might be ok.