SQL Insights

Focus on the Task at Hand

In his book Inner Excellence, Jim Murphy discusses the idea of focusing on the most basic element of the task at hand. Paul Loomans writes about the practice of concentrating all your attention on a single task in his book, I’ve Got Time.

If you're writing, focus on one sentence at a time. If you're lifting weights, commit to one rep. Don't worry about the entire paper or the remaining reps you still have to finish.

This can also apply to writing a SQL query. Focus on one clause at a time. Start with the SELECT and consider what you want to retrieve. You might even begin with the FROM clause, as it opens the door to all the data. Of course, this is all much easier said than done.