Google Workspace Security & Compliance conducts automated access audits on shared corporate assets. Write a SQL query to identify confidential files (`is_confidential = 1`) that have been shared with at least one external collaborator (where `shared_with_email` does not end with '@google.com'). For each qualifying file, return the `file_id`, `file_name`, and the count of external shares as `external_share_count`. Order the results by `external_share_count` in descending order, breaking ties by `file_id` in ascending order.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.