Problem Description

Instead of deleting customers, keep the row and mark it inactive. Add is_active (default 1) and set is_active=0 for customers who have no orders in the last 2 years.

Input Format

SQL DDL + DML

Output Format

Statements

Sample Test Case

Input:
Customers, Orders
Output:
Rows updated

Constraints

Assume PostgreSQL-style interval

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next