Capitalize the SQL, change tmp_cdr to an alias of c for CDR, and remove the spaces from the indentation.