select a.BusinessId,count(1) as count1,b.PlantNo,b.VendorCode
from Payment_Details a,Payment_Master b where a.BusinessId=b.BusinessId
and b.StartTime='2024-09-01'
group by a.BusinessId,b.PlantNo,b.VendorCode having count(1)>500
精华在having count(1)>500