Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select sum(col1), cast(max(col2) as date)
- from t;
- where col2 >= dateadd(hour, -15, cast(getdate() as date)) and
- col2 < dateadd(hour, 21, (cast getdate() as date))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement