Hi,
With buffering you cannot use SQL, nor can you create a unique index. What you can do, though, is using COPY TO to create a copy of the table and run the query against the copy. You also might have success with a hack like this:
BEGIN TRANSACTIOn
TABLEUPDATE(.T.,.T.)
SELECT COUNT(....
ROLLBACK
--
Christof