The story behind:
I have a transactions' table where i have transactions, income and outgoing, this table also contents some private transactions i don't want to have (they are marked with a int field), my idea was now make 2 Views, 1 for incoming money and one for outgoing and exclude the private stuff over the where in the view.
So I have now 2 views, income_month_year and outcome_month_year
both have the structure:
ym ms quarter ym
2022-09 116.56000 Q3-2022
I can have a month income and outgoing and some months only incoming or outgoing.
This sounds like a job for a full join, but on this I fail with "please check syntax", left and right joins work.
SELECT * FROM income_month_year inC FULL JOIN outcome_month_year outG ON inC.ym = outG.ym;
ym is a Varchar created in the view with DATE_FORMAT(record_date, '%Y-%m'), source fields are datetimes
Maybe on this way its also possible todo a calculation of the values?
thanks