nerdexam
Snowflake

COF-C02 · Question #68

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…

The correct answer is D. SELECT EVENT_TIMESTAMP, USER_NAME. The correct query selects EVENT_TIMESTAMP (the timestamp of the login event) and USER_NAME from the SNOWFLAKE.ACCOUNT_USAGE.LOGIN_HISTORY view, filtered to the last 90 days. This view is part of the ACCOUNT_USAGE schema and retains data for up to 365 days. Options B, C, and D…

Account Access and Security

Question

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?

Options

  • ASELECT LAST_SUCCESS_LOGIN, LOGIN_NAME
  • BSELECT EVENT_TIMESTAMP, USER_NAME
  • CSELECT EVENT_TIMESTAMP, USER_NAME
  • DSELECT EVENT_TIMESTAMP, USER_NAME

How the community answered

(50 responses)
  • A
    10% (5)
  • B
    4% (2)
  • C
    2% (1)
  • D
    84% (42)

Explanation

The correct query selects EVENT_TIMESTAMP (the timestamp of the login event) and USER_NAME from the SNOWFLAKE.ACCOUNT_USAGE.LOGIN_HISTORY view, filtered to the last 90 days. This view is part of the ACCOUNT_USAGE schema and retains data for up to 365 days. Options B, C, and D all appear identical in the question text (SELECT EVENT_TIMESTAMP, USER_NAME), but the distinguishing factor is the FROM clause - the correct answer queries SNOWFLAKE.ACCOUNT_USAGE.LOGIN_HISTORY. Option A is wrong because LAST_SUCCESS_LOGIN and LOGIN_NAME are not the correct column names in the LOGIN_HISTORY view for this audit purpose.

Topics

#Login History#Account Usage Views#Security Auditing#Information Schema

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice