ARTICLE DETAIL

资讯详情

深耕网站建设、视觉设计与SEO优化的一线实战洞察。

找到子表中超过500条记录的数据

找到子表中超过500条记录的数据

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

返回列表