Created
May 20, 2018 18:53
-
-
Save kevincdurand1/0b2799b4957fe86314873c7e9a44464c to your computer and use it in GitHub Desktop.
Percent Change.Sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT [DateTime],[Close] | |
| ,([Close] - LAG ([Close],1) OVER (ORDER BY [DateTime]))/LAG ([Close],1) OVER (ORDER BY [DateTime])*100 AS PCT_CHANGE_CLOSE | |
| FROM [dbsec].[dbo].[EURUSDM1FiboMA]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment