SELECT * FROM TF_IDF ( ON TF ( ON { table | view | (query) } PARTITION BY docid [ Formula ({ 'normal' | 'bool' | 'log' | 'augment' }) ] ) AS tf PARTITION BY term [ ON (SELECT COUNT (DISTINCT docid) FROM doccount_table) AS doccount DIMENSION ] [ ON (SELECT term, COUNT (DISTINCT docid) FROM docperterm_table GROUP BY term)AS docperterm PARTITION BY term ] [ ON (SELECT DISTINCT (term) AS term, idf FROM tf_idf_output_table ) AS idf PARTITION BY term ] );