Valid DEA-C02 Dumps shared by EduDump.com for Helping Passing DEA-C02 Exam! EduDump.com now offer the newest DEA-C02 exam dumps, the EduDump.com DEA-C02 exam questions have been updated and answers have been corrected get the newest EduDump.com DEA-C02 dumps with Test Engine here:
A data engineer is working with a Snowpark DataFrame 'sales df containing sales data with columns 'product id', 'sale_date', and 'sale amount'. The engineer needs to calculate the cumulative sales amount for each product over time. Which of the following code snippets using window functions correctly calculates the cumulative sales amount, ordered by 'sale date'?
Correct Answer: A,D
Options A and D are correct. They both correctly define a window specification partitioned by 'product_id' and ordered by 'sale_date' . Both options then calculate the cumulative sum of 'sale_amount over this window. Option A defines the window and applies it to the dataframe whereas Option D applies it to the dataframe in one step. Options B and E are incorrect because the order of partitionBy and orderBy is incorrect when setting the window specification. Option C is incorrect as it does not apply a window function after the orderBy.