select * from dbo.Vehicle_Maintain_Details A inner join (
select MaintainType as tempTypeName,count(ID) as num from dbo.Vehicle_Maintain_Details group by MaintainType) B 
on A.MaintainType=B.tempTypeName

  

版权声明:本文为ryan-wan原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/ryan-wan/archive/2013/01/09/2853408.html