- Identify the query on which expression stats need to be collected.
- Use the following format to collect statistics:
COLLECT [SUMMARY] STATISTICS[USING options]COLUMN expr [[AS] statistics_name][,COLUMN (expr […, expr]) [[AS] statistics_name]]ON [TEMPORARY] <Table>;