对不起大家...
我是新手,左加入计数有问题
结构表A:
结构表 B:
----------------------
|Branch_code | NIK
----------------------
'IDJB001BEC', '1300001'
'IDJB001BEC', '1300002'
'IDPA001PPA', '1300003'
'IDJK001MAG', '1300004'
'IDJB001BEC', '1300005'
'IDJB001BEC', ''
'IDBTNCTR', ''
结构表 C:
|branch_code|
'IDBE001BGK'
'IDBE002BGK'
'IDBTNCTR'
'IDJB001BEC'
'IDJK001HO'
'IDJK001MAG'
'IDJK001MPI'
'IDJK002MCL'
'IDJK002MPB'
'IDJK003KDY'
我希望从这样的结果中获得样本:
|Branch_code|count|
'IDJK001MAG' 0
'IDJK001MPI' 0
'IDJK002MCL' 3
'IDJK002MPB' 5
'IDJK003KDY' 4
注意:尽管该行为空/零,但“计数”字段仍显示零。
感谢师父