SnowPro Core Certification — Question 217
A company’s security audit requires generating a report listing all Snowflake logins (e.g., date and user) within the last 90 days.
Which of the following statements will return the required information?
Answer options
- A. SELECT LAST_SUCCESS_LOGIN, LOGIN_NAME FROM ACCOUNT_USAGE.USERS;
- B. SELECT EVENT_TIMESTAMP, USER_NAME FROM table(information_schema.login_history_by_user())
- C. SELECT EVENT_TIMESTAMP, USER_NAME FROM ACCOUNT_USAGE.ACCESS_HISTORY;
- D. SELECT EVENT_TIMESTAMP, USER_NAME FROM ACCOUNT_USAGE.LOGIN_HISTORY;
Correct answer: D
Explanation
The correct answer is D because the ACCOUNT_USAGE.LOGIN_HISTORY view specifically tracks login events, which include timestamps and usernames, making it suitable for the audit's requirements. Options A and C do not focus on login events specifically, while B uses a different function that may not capture the complete login history within the required timeframe.