Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Include Count Of Records In this Query
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Include Count Of Records In this Query
Miscellaneous
Thread ID:
01399490
Message ID:
01399490
Views:
104
Ok, so now I have this query
	SELECT LH.* 
		FROM LocationHistory LH 
		INNER JOIN (SELECT MAX(Sequence) AS Sequence, PartID, SerialNo 
			FROM LocationHistory  
			GROUP BY PartID, SerialNo ) Derived 
				ON LH.Sequence = Derived.Sequence and 
				   LH.PartID = Derived.PartID and 
				   LH.SerialNo = Derived.SerialNo
I want to include as part of the result set a count of all records of each PartId/SerialNo combination
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform