I have these two tables, January and February:
Eachfieldcorrespondstothedayofthemonth,d1=day01,etc.Ineedtocreateaselectthatshowsthemonthlyvalueofeachaccountplan,forexample:
How would this sql be?
Your model is bad, make one of the
Date Value
With date functions makes it easy to total by month , year, week etc.
Try to use the following code:
SELECT
SUM(d1 + d2 + d3 + ... + d12) as soma
FROM
janeiro