71. How do you optimize slow query?
Check execution plan, indexes, joins, and filters.
72. Why is SELECT * bad in production?
It reads unnecessary columns and slows performance.
73. How do indexes improve performance?
They reduce full table scans and speed lookups.
74. When can indexes hurt performance?
During frequent inserts/updates/deletes.
75. How do you identify full table scan?
Check execution plan.
76. How do you reduce join cost?
Join indexed columns and filter early.
77. How do you optimize aggregation query?
Index group columns and reduce rows before grouping.
78. How do you improve WHERE clause filtering?
Avoid functions on indexed columns.
79. Why is query slow despite indexes?
Poor joins, stale stats, bad filters, or wrong index usage.
80. What is execution plan used for?
To analyze how SQL engine executes query.
81. How do you find duplicate customers in CRM?
Match on name, email, phone, or business rules.
82. How do you find customer churn?
Identify customers with no activity in defined period.
83. How do you calculate retention rate?
Find returning customers ÷ total customers.
84. How do you calculate conversion rate?
Converted users ÷ total users.
85. How do you find top-selling product?
Group by product and sort by total sales desc.