|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dear all,
I have 3 column: date, time, stocks name, price I have 2 questions: 1. what is the command (or query languange) to get the the first and/or last observations for any given day (i know it can be done in aggregate query, in Ms acces but can it be done in SQL server query as well?)? e.g. I want to get the first and last price of the day for any particular stocks 2. how to calculate return with the following formula: return=log P(t)-log P(t-1), where P(t) is price at time t say 10 am and P(t-1) is price at one period previous t say 9 am? Regards Charly |
|
#2
|
|||
|
|||
|
You can find the answers in the transact-sql section of the documentation in the SQL Server Books Online
http://msdn.microsoft.com/library/e...lserver2000.asp
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > re: help please |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|