hard
Optimize SQL Query
Improve the performance of a slow SQL query.
📝 Prompt Content
Review the following SQL query which is taking too long to run on a table with 10 million rows. Suggest three specific optimizations to improve performance, such as indexing strategies or query restructuring, and provide the rewritten SQL code.