try the DISTINCT keyword ?


----- Original Message ----- From: "erw2" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, April 04, 2007 4:14 PM
Subject: [sqlite] What query should I use?


Hi,
I have a table with a following data:

Id    Text1   Text2   Text3   Text4
-----------------------------------
1    1001     11     test03   test13
2    1002     11     test01   test11
3    1003     12     test04   test12
4    1004     12     test02   test34
5    1004     12    test06   test56
6    1005     11    test17   test67
7    1005     12    test07   test57
8    1006     13     test05   test98
9    1007     13     test02   test93
10   1008     14     test01   test03
...  ....     ...    ......   ......

Now, I would like to select only the rows when Text2 change. So the
result of such query should look like:

Id    Text1   Text2   Text3   Text4
-----------------------------------
1    1001     11      test03   test13
3    1003     12      test04   test12
6    1005     11     test17   test67
7    1005     12      test07   test57
8    1006     13      test05   test98
10   1008     14      test01   test03
...  ....     ...    ......   ......

How should this query look like?

Regards
Wojciech W.


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



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

Reply via email to