Hi,

I am using SQLite 3.11. I create a table as follows:

                                CREATE TABLE MyTable (F1 INTEGER, F2
INTEGER, F3 INTEGER);

Then add the following records:

                                INSERT INTO MyTable (F1, F2, F3) Values (1,
2, 8); 
                                INSERT INTO MyTable (F1, F2, F3) Values (1,
3, 9);
                                INSERT INTO MyTable (F1, F2, F3) Values (2,
4, 8);
                                INSERT INTO MyTable (F1, F2, F3) Values (2,
5, 2);
                                INSERT INTO MyTable (F1, F2, F3) Values (3,
6, 4);
                                INSERT INTO MyTable (F1, F2, F3) Values (3,
7, 8);
                                INSERT INTO MyTable (F1, F2, F3) Values (3,
7, 9);
                                INSERT INTO MyTable (F1, F2, F3) Values (4,
2, 4);
                                INSERT INTO MyTable (F1, F2, F3) Values (4,
2, 6);

Now I want to eliminate duplicate record so for two records whose F1 and F2
values are identical, even if their F3 values are different, then one record
with the largest value of F3 will be kept and the other one will be removed.

Is that possible with the DELETE statement?

Thanks

Reply via email to