SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Google Drive: External Sensitive File Shares

Unsolved

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.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 Google

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM drive_files
Full source dataset
5 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine