funds_table --------------------------- source_id, amount, date, --------------------------- 1, 1000, 2016-01-15 2, 2000, 2016-02-28
ca_table --------------------------- ca_id,source_id, amount --------------------------- c1 , 1, 500 c2 , 1, 500 c3 , 2, 900 c4 , 2, 1100
exp_table --------------------------- exp_id, ca_id, amount, --------------------------- e1, c1, 0 e2, c1, 250 e3, c2, 500 e4, c3, 500 e5, c4, 600 e6, c4, 500
Ich möchte die select MONTH (Datum), sum (funds_table.amount **) summieren, Summe (ca_table.amount), sum (exp_table.amount) verbinden sich wo Jahr (Datum) = 2016 und Gruppe von Monat (Datum)Mysql Summe Spalte verschiedene 3-Tabellen
erwartete Ausgabe
----------------------------------------------------------------------- MonthName(date),sum(source_id.amount),sum(ca_id.amount),sum(exp_id.amount) ----------------------------------------------------------------------- Jan , 1000, 1000, 750 Feb , 2000, 2000, 1100
3 Tagen Suche nach Ergebnis, aber ich kann das genaue Ergebnis.
Was hav eyou versucht, und wo ist dein Problem? – Jens
ich will die letzte tabelle wird ergebnis –