Databricks Certified Data Engineer - Associate

Databricks Certified Data Engineer - Associate

Get started today

Ultimate access to all questions.


You are working with a Delta Lake table 'orders' that contains columns 'order_id', 'customer_id', and 'order_date'. You need to create a new table 'recent_orders' that includes only the orders from the last 30 days. Write the Spark SQL query to achieve this.




Explanation:

The correct answer is A because it correctly uses the 'current_date() - interval 30 days' expression to filter orders from the last 30 days and creates a new table 'recent_orders' with these filtered rows.