查询一个字段,并且这个字段在另外一张表的出现的总次数
SELECT
b2c_user_card.card_no,
COUNT( b2c_charge_money.card_no) as alls
FROM
b2c_user_card
LEFT JOIN b2c_charge_money ON b2c_user_card.card_no = b2c_charge_money.card_no
WHERE
b2c_user_card.card_no = 2455475608826567
查询一个字段,并且这个字段在另外一张表的出现的总次数
SELECT
b2c_user_card.card_no,
COUNT( b2c_charge_money.card_no) as alls
FROM
b2c_user_card
LEFT JOIN b2c_charge_money ON b2c_user_card.card_no = b2c_charge_money.card_no
WHERE
b2c_user_card.card_no = 2455475608826567