r/SQL • • May 27 '25

SQL Server What is SQL experience?

I have seen a few job postings requiring SQL experience that I would love to apply for but think I have imposter syndrome. I can create queries using CONCAT, GROUP BY, INNER JOIN, rename a field, and using LIKE with a wildcard. I mainly use SQL to pull data for Power BI and Excel. I love making queries to pull relevant data to make business decisions. I am a department manager but have to do my own analysis. I really want to take on more challenges in data analytics.

174 Upvotes

87 comments sorted by

View all comments

Show parent comments

1

u/dcw7844 May 27 '25

Is there a “correct” answer to 7? I am more familiar with temp tables so I gravitate towards those, but if performance is an issue I generally try both and see which performs better. Sometimes it’s the temp tables and sometimes it’s the CTE, and don’t really understand why.

1

u/gipper_k May 28 '25

I'm more interested in whether the candidate can express a well-considered opinion on this. I'm more interested in the "why" of their answer rather than the answer itself.

1

u/apococlock May 30 '25

No. There are use cases for both. I suspect the question is designed to show whether you can even differentiate the two.

1

u/PasghettiSquash May 28 '25

CTEs generally have better performance, but I think the real benefit is that they are much more readable. We use SQLFluff as a linter and have a CI rule to outlaw subqueries (and other generally unreadable stuff like select *). "New lines are cheaper than brain cycles" is a dbt quote, and when you're building a SQL based repo it pays immense dividends to have proper code