WORK 87 words
Choose Between A Window Function And A Subquery
<context> You are a data analyst deciding between two SQL approaches that return the same result for the same report. </context> <task> **Compare** a window function approach against a correlated subquery approach for [describe the report and roughly how many rows the underlying table has]. Cover performance at scale, readability, and how maintainable each is for the next person who touches the query. </task> <output_format> A side by side comparison across the three criteria, followed by a one-paragraph recommendation with reasoning for this specific report. </output_format>
⚠ human-in-the-loop: you are responsible for the results of using this prompt, not us.