Re:What not to do during an interview
by andrewstuart on Tuesday July 01, 2014 @05:06AM
(#7969722)
So you're saying you think that questions on syntax are important. We'll have to agree to disagree on that.
Re:What not to do during an interview
by EdwardDiego on Tuesday July 01, 2014 @06:45AM
(#7969967)
That isn't a question on syntax, sorry. We'll have to very much disagree if you think this is just syntax. It's a core part of SQL that anyone with advanced SQL skills should at least be aware of.
Syntax would be caring if they put the ORDER BY in front of the GROUP BY.
I agree, which is why I gave GROUP BY HAVING as an example filter for 'advanced' SQL skills (especially as my team manages data warehousing and analytics).
It's not a minor implementation detail, it's the major tool for filtering on aggregated values - something like 'find customers who have purchased two more products in one month' can either be done as a query of an aggregated sub-query, or as one query using HAVING to filter for customers with a COUNT(*) > 2.
Again, this is only for people claiming advanced skills, and it's not that an 'advanced' feature. I don't expect every developer to know about SQL:2003's window functions, but HAVING has been around since at least 1992.
I agree with not asking silly technicalities, as a Java developer, knowing why new Integer(100) == new Integer(100) but new Integer(1000) != new Integer(1000) is an interesting piece of trivia, but using it in an interview is a waste of everyone's time.