Create a simple view

Easy
0 views 23 Jan 2026
Create view v_customer_basic showing customer_id, name, city....

Query a view

Easy
0 views 23 Jan 2026
Write a query that reads from v_customer_basic for city='Pune'....

View for active products

Easy
0 views 23 Jan 2026
Create view v_active_products that filters Products where is_active=1....

Replace a view

Easy
0 views 23 Jan 2026
Update v_active_products to include category as well....

Drop a view

Easy
0 views 23 Jan 2026
Drop view v_customer_basic if it exists....

View with join for reporting

Medium
0 views 23 Jan 2026
Create v_order_summary showing order_id, customer_name, total_amount, order_date....

View to hide sensitive columns

Medium
0 views 23 Jan 2026
Payroll(emp_id, salary, bank_account). Create view exposing emp_id and salary only....

Updatable view idea

Medium
0 views 23 Jan 2026
Create a view v_new_orders that selects Orders where status='NEW'. Show an update statement that updates through the view....

View with aggregation

Medium
0 views 23 Jan 2026
Create view v_daily_sales that returns day and total_sales from Orders....

Materialized view style (concept)

Medium
0 views 23 Jan 2026
Assume your database supports materialized views. Create one materialized view that stores monthly revenue from Orders....

View with security filter by city

Hard
0 views 23 Jan 2026
Create v_my_city_customers that only returns customers for city='Delhi'....

View for duplicate detection

Hard
0 views 23 Jan 2026
Create view v_duplicate_emails that lists emails appearing more than once in Users....

View combining latest order per customer

Hard
0 views 23 Jan 2026
Create view v_customer_latest_order that shows each customer with their latest order_id and date....

View for category revenue

Hard
0 views 23 Jan 2026
Create view v_category_revenue that returns category and revenue using OrderItems and Products....

View for customer spend rank

Hard
0 views 23 Jan 2026
Create view v_customer_spend_rank that shows customer_id, spend, and rank by spend (highest rank 1)....