SQL Server Query to Count Value Every 06:30
问题 please help me. I am having problem with my data and my query. Please look at my table design first. CREATE TABLE [dbo].[my_table]( [ID] [int] NOT NULL, [date] [datetime] NULL, [value] [int] NULL, [product_code] [varchar](50) NULL, [expectedvalue] [int] NULL, CONSTRAINT [PK_my_table] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO And this is the data, all