Company: AT&T
Difficulty: medium
Problem Description As part of the monthly analytics for the "HackerAd" advertising network deployed on a company's file storage service, you need to write a query that returns a summary of collected file download events for June 2022 . Schema events Column Name Type Description dt VARCHAR(19) Event datetime (format: 'YYYY-MM-DD HH:MM:SS') mime VARCHAR(255) MIME type of the downloaded file filename VARCHAR(255) Name of the file (includes the extension) filesize INT Size of the file in bytes Required Output The result should have the following columns, ordered descending by the raw total size of the files in bytes: mime - The MIME type. extension - A comma-separated string of unique file extensions associated with the MIME type. The extensions must be sorted in ascending alphabetical order. files - The total number of files downloaded for the specific MIME type. total - The total size of the files for the specific MIME type, formatted as a string. The value must be rounded to exactly tw