0 views
23 Jan 2026
Create view v_customer_basic showing customer_id, name, city....
0 views
23 Jan 2026
Write a query that reads from v_customer_basic for city='Pune'....
0 views
23 Jan 2026
Create view v_active_products that filters Products where is_active=1....
0 views
23 Jan 2026
Update v_active_products to include category as well....
0 views
23 Jan 2026
Drop view v_customer_basic if it exists....
0 views
23 Jan 2026
Create v_order_summary showing order_id, customer_name, total_amount, order_date....
0 views
23 Jan 2026
Payroll(emp_id, salary, bank_account). Create view exposing emp_id and salary only....
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....
0 views
23 Jan 2026
Create view v_daily_sales that returns day and total_sales from Orders....
0 views
23 Jan 2026
Assume your database supports materialized views. Create one materialized view that stores monthly revenue from Orders....
0 views
23 Jan 2026
Create v_my_city_customers that only returns customers for city='Delhi'....
0 views
23 Jan 2026
Create view v_duplicate_emails that lists emails appearing more than once in Users....
0 views
23 Jan 2026
Create view v_customer_latest_order that shows each customer with their latest order_id and date....
0 views
23 Jan 2026
Create view v_category_revenue that returns category and revenue using OrderItems and Products....
0 views
23 Jan 2026
Create view v_customer_spend_rank that shows customer_id, spend, and rank by spend (highest rank 1)....