Link to home
Start Free TrialLog in
Avatar of lsberman
lsberman

asked on

How do I implement First() and Last() aggregates like Access in MS-SQL?

Hi!  I need First() and Last() aggregates for MS-SQL that work like the same-named aggregates in Access.  My specific use is the I have financial "tick" values (date/time with price) that I want to roll up into a standard Open/High/Low/Close bar.  Min() and Max() work great for the Low and High values but I need something to get the first (Open) and last (Close) values as well.  I will be grouping the bars on one-minute intervals.  Any help in this regard would be greatly appreciated.  Thanks....
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial