You have a Snowflake environment with several databases and schemas. You need to identify all schemas within a specific database named 'CUSTOMER DATA that are currently owned by the role 'SECURITY ADMIN'. You also want to retrieve the creation date and time of each identified schema. Which of the following queries will efficiently accomplish this task?
Correct Answer: E
The `snowflake.account_usage.schemas' view provides metadata about schemas, including the database name, schema name, creation date, and owner role. The correct column name for the owner role is 'owner_role' and not just `owner". 'database_name' and `name' are also correct column names. option B and D uses 'SCHEMA OWNER from 'INFORMATION_SCHEMX , and
'SCHEMA_OWNER is deprecated and less reliable for role ownership. It's important to use the
`account_usage' views for comprehensive and accurate metadata retrieval. Option A requires parsing the output of 'SHOW SCHEMAS", which is less efficient than a direct query.