I have a table with records like:
ID End Price
A 20060625 5.7025000000000 0000000
A 20060725 5.7650000000000 0000000
A 20060825 5.7043800000000 0000000
A 20060925 5.7100000000000 0000000
A 20061025 5.7000000000000 0000000
A 20061125 5.7000000000000 0000000
A 20061225 5.7300000000000 0000000
A 20070125 5.7000000000000 0000000
I want to get a query which would give the result as:
ID End Price
A 20060625 5.7025000000000 0000000
A 20060725 5.7650000000000 0000000
A 20060825 5.7043800000000 0000000
A 20060925 5.7100000000000 0000000
A 20061025 5.7000000000000 0000000
A 20061225 5.7300000000000 0000000
A 20070125 5.7000000000000 0000000
The reason is that the 5th and 6th record had the same price. Then I dont want to display that. So in other words i want to be able to compare the prices between each consecutive rows and return only the rows that dont match. Is it possible to do it in a single query?
ID End Price
A 20060625 5.7025000000000 0000000
A 20060725 5.7650000000000 0000000
A 20060825 5.7043800000000 0000000
A 20060925 5.7100000000000 0000000
A 20061025 5.7000000000000 0000000
A 20061125 5.7000000000000 0000000
A 20061225 5.7300000000000 0000000
A 20070125 5.7000000000000 0000000
I want to get a query which would give the result as:
ID End Price
A 20060625 5.7025000000000 0000000
A 20060725 5.7650000000000 0000000
A 20060825 5.7043800000000 0000000
A 20060925 5.7100000000000 0000000
A 20061025 5.7000000000000 0000000
A 20061225 5.7300000000000 0000000
A 20070125 5.7000000000000 0000000
The reason is that the 5th and 6th record had the same price. Then I dont want to display that. So in other words i want to be able to compare the prices between each consecutive rows and return only the rows that dont match. Is it possible to do it in a single query?
Comment