Using Xbase code
> INDEX ON company TAG temp UNIQUE
> COPY TO newtable
> Doing it with SQL is trickier; the result you get with the Xbase way is too random in the eyes of SQL theorists.
> It is possible though if we add a separate primary, or candidate key.
> ALTER TABLE Companies ADD COLUMN key Int
> UPDATE Companies SET key = RECNO()
> SELECT T1.* FROM Companies AS T1 JOIN ;
> (SELECT MAX(key) AS key, company FROM Companies GROUP BY company ) As T2;
> ON T1.key=T2.key INTO CURSOR Q1