Problem Description

Create sp_refresh_daily_sales that truncates DailySales and re-inserts aggregated totals from Orders.

Input Format

SQL procedure

Output Format

Procedure created

Sample Test Case

Input:
DailySales(day, amount), Orders(order_date, total_amount)
Output:
Procedure created

Constraints

Use TRUNCATE + INSERT SELECT

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next