Hi -
I want to get the db2 SQL output of a query, WHERE B>=90 and wherever it find the matching condition it should fetch preceding 3 rows.
For Example -
A B
- -
1 5
0 6
5 8
1 10
2 20
3 30
4 98
5 50
11 55
6 60
7 70
8 90
9100
So the output should be based on above criteria -
A B
- -
1 10
2 20
3 30
4 98
11 55
6 60
7 70
8 90
Any help will be appreciated.
Thanks
Sandip
I want to get the db2 SQL output of a query, WHERE B>=90 and wherever it find the matching condition it should fetch preceding 3 rows.
For Example -
A B
- -
1 5
0 6
5 8
1 10
2 20
3 30
4 98
5 50
11 55
6 60
7 70
8 90
9100
So the output should be based on above criteria -
A B
- -
1 10
2 20
3 30
4 98
11 55
6 60
7 70
8 90
Any help will be appreciated.
Thanks
Sandip