erw2 <[EMAIL PROTECTED]> wrote:
I have a table with a following data:
Id    No1   No2
----------------
1    1001   11
2    1002   11
3    1003   12
4    1004   12
5    1004   12
6    1005   12
7    1006   13
8    1007   13
9    1008   14
...  ....   ...

Now, I would like to select only the rows when No2 change. So the
result of such query should look like:
Id    No1   No2
----------------
1    1001   11
3    1003   12
7    1006   13
9    1008   14
...  ....   ...

select min(Id), min(No1), No2
from TableName
group by No2;

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to