I am trying to write a sql to find the minimum of a dataset
,MIN(ST.BG_DTTM) over(ORDER BY ST.BG_DTTM) AS "Minim"
but it is giving me a error saying
Error: Incorrect syntax near 'order'. (State:37000, Native Code: 66)
any help is appreciated.