# 参考:https://blog.csdn.net/weixin_34273479/article/details/87587183
res = Name.select(Name, User.xxx).join(User, join_type=JOIN.LEFT_OUTER, on=((User.mcc == Name.mcc) & (Name.day == User.day)))
for x in res:
print(x.user.xxx)
来源:oschina
链接:https://my.oschina.net/u/4265623/blog/4503450