Snowflake interview question

SQL Queries and tuning