Hi,
I am having following table in my database
id no name prev_no action
1 3 a 0 join
2 3 a 0 confirm
3 4 b 0 join
4 3 a 0 transfer
5 5 a 3 join
6 4 b 0 confirm
7 5 a 0 perform
8 5 a 0 transfer
9 4 b 0 perform
10 7 a 5 join
The output I want is
id no name prev_no
1 3 a 0
5 5 a 3
10 7 a 5
Could anyone please help me for writing the query?
Your help will be highly appriciated.
Thanks,