我有两个表,如下所示.. 我需要在 sql 查询中使用 join 连接两个表,但我是新手,所以请帮助我.. 因为我需要输出表,如第三个表所示
tbl_MonthList
MonthID MonthList
1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
tbl_金额:
Month_id Amount_Received Customer_id
3 500 aaa
3 1000 bbb
4 700 jjj
5 300 aaa
5 400 jjj
5 500 ppp
7 1000 aaa
10 1500 bbb
12 700 jjj
我需要如下所示的输出
Month Total_amount
January 0
February 0
March 2000
April 700
May 1200
June 0
July 1000
August 0
September 0
October 1500
November 0
December 700