0
我有四個表在MySQL一樣用SUM()
T1: division(divisionID, division_name)
T2: work(workID, divisionID, category, work_desc, value)
T3: approved_work(approve_id, workID, approved_on)
T4: payment(payment_id, workID, amount_paid, paid_date)
現在加入多個表的,我希望有一個報告,即。
T1.division_name, T2.category, T2.work_desc, T2.value, T3.approved_on, sum(amount_paid)
請在SQL查詢
加入表(也許左連接)。做一個小組。祝你好運! – jarlh