The select p. arent, B.I d, A.N AME, B.N AME, biggest reateUserName, biggest reateTime,
The count (ame) AS Num
The FROM CostSubject A
LEFT the JOIN CostSubject B ON p. arent=Anderson d
LEFT the JOIN CostSubject C ON C.P arent=B.I d
GROUP BY p. arent, B.I d, A.N AME, B.N AME, biggest reateUserName, biggest reateTime