The data analyst team had put together databricks video

 ·  PT1H46M27S  ·  EN

data-engineer-associate video for the data analyst team had put together queries that identify items that are out of stock based on orders and replenishment but

Full Certification Question

The data analyst team had put together queries that identify items that are out of stock based on orders and replenishment but when they run all together for final output the team noticed it takes a really long time. You were asked to look at the reason why queries are running slow and identify steps to improve the performance. When you looked at it, you noticed all the code queries are running sequentially and using a SQL endpoint cluster. Which of the following steps can be taken to resolve the issue? Here is the example query Ñ Get order summary create or replace table orders_summary as select product_id, sum(order_count) order_count from ( select product_id,order_count from orders_instore union all select product_id,order_count from orders_online ) group by product_id Ñ get supply summary create or repalce tabe supply_summary as select product_id, sum(supply_count) supply_count from supply group by product_id Ñ get on hand based on orders summary and supply summary with stock_cte as ( select nvl(s.product_id,o.product_id) as product_id, nvl(supply_count,0) Ð nvl(order_count,0) as on_hand from supply_summary s full outer join orders_summary o on s.product_id = o.product_id ) select * from stock_cte where on_hand = 0