
Ultimate access to all questions.
As a data engineer, you are tasked with identifying employees who have more than 5 years of experience from a dataset. The data is stored in a table named stores, where employee information is contained in an array column called employees. Your goal is to create a new column, named exp_employees, which will hold an array of employees with over 5 years of experience for each row in the table. To efficiently apply this custom logic at scale, you should use the FILTER higher-order function. Which of the following code blocks successfully completes this task?_
A
SELECT store_id, employees, FILTER (employees, i -> i.year_exp > 5) AS exp_employees FROM stores_
B
SELECT store_id, employees, FILTER (exp_employees, i -> i.year_exp > 5) AS exp_employees FROM stores
C
SELECT store_id, employees, FILTER (employees, year_exp > 5) AS exp_employees FROM stores_
D
SELECT store_id, employees, CASE WHEN employees.year_exp > 5 THEN employees ELSE NULL END AS exp_employees FROM stores_