I read about a technique to identify distinct field values. Assuming SourceTable is loaded with carmodel field
DistinctCarmodel:
LOAD DISTINCT
carmodel,
Autonumber(carmodel) AS %Distinct_carmodel
RESIDENT
SourceTable
With simple or complex set analysis, we can use
count(%Distinct_carmodel)
or
max(%Distinct_camodel)
I tweaked this idea a bit with the following
DistinctCarmodel:
LOAD DISTINCT
carmodel,
Autonumber(carmodel,'distinctcarmodel') AS %Distinct_carmodel
RESIDENT
TempSourceTable;
SourceTable:
LOAD
carmodel,
Autonumber(carmodel,'distinctcarmodel') AS %Distinct_carmodel
RESIDENT
TempSourceTable;
DROP TABLE DistinctCarmodel;
The one difference is we would have to use
max(%Distinct_camodel)