SPSS Aggregate
The AGGREGATE command computes descriptive statistics.
Usage
aggregate outfile=* mode=addvariables /Total_Sales = sum(Sales).
See here for the list of available AGGREGATE functions.
Break
The /BREAK subcommand specifies one or more variables to split aggregation.
Note that omitting a /BREAK subcommand is unsupported in SPSS version 16 or earlier, and in PSPP version 1.6.2 or earlier.
Presorted
If the dataset is already sorted by all variables specified on the /BREAK subcommand, use the '/PRESORTED subcommand to skip re-sorting. The /PRESORTED subcommand must precede the /BREAK subcommand.
Outfile and Mode
The default behavior is OUTFILE=* and MODE=ADDVARIABLES (i.e. modify the active dataset in-place and add variables to it).
To instead populate a new dataset, try:
sort cases by VARLIST. dataset declare DUPLICATES. aggregate /outfile="DUPLICATES" /presorted /break=VARLIST /COUNT=N. execute. dataset activate DUPLICATES. select if COUNT>1.
Data Model
The AGGREGATE command causes all pending transformations to execute, and reads the active dataset.