Valid DAA-C01 Dumps shared by EduDump.com for Helping Passing DAA-C01 Exam! EduDump.com now offer the newest DAA-C01 exam dumps, the EduDump.com DAA-C01 exam questions have been updated and answers have been corrected get the newest EduDump.com DAA-C01 dumps with Test Engine here:
You have a Snowflake table named 'orders' with columns (INT), (DATE), and (VARIANT). The 'order_detailS column contains a JSON object with information about items in the order, including a nested array of items called 'items' , where each item has a (INT) and 'quantity' (INT). You need to write a SQL query to extract all 'product_id' values from the 'items' array within the column for orders placed in the last 30 days. Which query will accomplish this most effectively?
Correct Answer: A
Option A correctly uses the 'LATERAL FLATTEN' function to unnest the 'items' array within the 'order_details variant column. This creates a row for each item in the array, allowing you to access the 'product_id' for each item. The 'WHERE clause filters the results to only include orders from the last 30 days. Options B, C, D and E do not correctly use the 'FLATTEN' function and would only retrieve the product_id of the first item in the array, if the array exists.