Create a View of Active Customers
Easy
DDL & Constraints
Create a view named ActiveCustomers that exposes the id and name of customers whose status is 'active'. Then select all rows from the view ordered by id.
Table schema
Customers(id INT PRIMARY KEY, name VARCHAR(50), status VARCHAR(20))Sample data
id | name | status
1 | Aman | active
2 | Riya | inactive
3 | Karan | active
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.