select label, mime_type as value from cr_mime_types select count(*) from ($sql_query) x