VB.NET How to select the earliest and latest record of a set of rows based on timestamp and ID Sql server
I have many rows being returned which contain a autonumber, qty, timestamp and foreignKeyID fields...what I need is to get the totalqty of all the rows, and the time difference between the latest timestamp and the earliest timestamp all based on the same foreign key ID
Based on these variables I need to see the totalqty/time difference ...which will give the # of units counted per minute.
I am using VB.Net and Sql Server 2005... I am just a bit fuzzy on the actual grabbing of the earliest & latest timestamp... I could use the AutoNumber field ( Max / Min) of the table based on the foreign key...but is there a better way...
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.