Task: Text to Code
Input (English): Step 1: for each value of document_type_code in Documents table, calculate number of rows.
Step 2: show each value of document_type_code in Documents table along with the corresponding average access_count with smallest value in the results of step 1
Output (English): SELECT access_count , Avg ( access_count ) FROM Documents GROUP BY document_type_code ORDER BY Count ( * ) Asc LIMIT 1