int not null identity (1 ,1 ) constraint PK_Observation_Id primary key ,
Multiple observations during a TimeSpan on 1 barcode are collected into 1 record. Lets assume we have a table structure like:
And the answer is: don’t use select top 1, instead use the row_number() function and the OVER clause.