I have two tables , ‘Checkpoint-table Movement and ‘Station‘. Now i want to count, number of times PNR(this is a record) has passed between 06:00-20:00pm today(Date Time Passed record) to Station Description record. How can i do this by using inner join with count?
// Two tables SELECT TOP 1000 [Plant Code] ,[Production Year] ,[PNR] ,[DateTime Passed] FROM [Tracking_Server_DB].[dbo].[Checkpoint Movement] SELECT TOP 1000 [Station Code] [Station Description] ,[Tracking Client Name] ,[Previous Station Code] FROM [Tracking_Server_DB].[dbo].[TS_Station]