SQL Query Compare values in per 15 minutes and display the result per hour
问题 I have a table with 2 columns. UTCTime and Values. The UTCTime is in 15 mins increment. I want a query that would compare the value to the previous value in one hour span and display a value between 0 and 4 depends on if the values are constant. In other words there is an entry for every 15 minute increment and the value can be constant so I just need to check each value to the previous one per hour. For example +---------|-------+ | UTCTime | Value | ------------------| | 12:00 | 18.2 | | 12