Original Sub-query
SELECT COUNT (*) as Tp_count from Sdb_b2c_orders WHERE pay_status= ' 1 ' and createtime>1413533130 and Area_code in (1030,1 031,1032,1033) and member_id in (select member_id from Sdb_invite_invite where in_member_id=14273 or in_member_id=13742 or in_member_id=14299) LIMIT 1
Execution results are22
Use a connection query instead of the subquery above
SELECT COUNT (*) as Tp_count from Sdb_b2c_orders as Bo INNER joins Sdb_invite_invite as II on bo.member_id=ii.in_member_id W Here bo.pay_status= ' 1 ' and Bo.area_code in (1030,1031,1032,1033) and bo.createtime>1413533130 and ii.in_member_id in ( 14273,13742,14299)
The result of execution is131
Reply content:
Original Sub-query
SELECT COUNT (*) as Tp_count from Sdb_b2c_orders WHERE pay_status= ' 1 ' and createtime>1413533130 and Area_code in (1030,1 031,1032,1033) and member_id in (select member_id from Sdb_invite_invite where in_member_id=14273 or in_member_id=13742 or in_member_id=14299) LIMIT 1
Execution results are22
Use a connection query instead of the subquery above
SELECT COUNT (*) as Tp_count from Sdb_b2c_orders as Bo INNER joins Sdb_invite_invite as II on bo.member_id=ii.in_member_id W Here bo.pay_status= ' 1 ' and Bo.area_code in (1030,1031,1032,1033) and bo.createtime>1413533130 and ii.in_member_id in ( 14273,13742,14299)
The result of execution is131
SDB_INVITE_INVITE.IN_MEMBER_ID Records have duplicates