S
SMB
Dear All,
Suppose I have a table with the following data
Date Rate
01-01-07 255
01-02-07 250
01-03-07 260
01-04-07 255
I want to write a query which calculates the rate difference in each row and
the output should be like this
Date Rate Difference
01-02-07 250 -5
01-03-07 260 10
01-04-07 255 -5
It means that the difference of rate in current date from the rate in
previous date should be the third column.
WHAT THE QUERY SHOULD BE ???????
Please write the select statement.
Thanks
Suppose I have a table with the following data
Date Rate
01-01-07 255
01-02-07 250
01-03-07 260
01-04-07 255
I want to write a query which calculates the rate difference in each row and
the output should be like this
Date Rate Difference
01-02-07 250 -5
01-03-07 260 10
01-04-07 255 -5
It means that the difference of rate in current date from the rate in
previous date should be the third column.
WHAT THE QUERY SHOULD BE ???????
Please write the select statement.
Thanks