When I phone screen a Java candidate, I ask just two technical questions to assess their competency and give me a feel for where they are on the scale of “Heads-down coder” to “Java Software Engineer”. In general, I try not to discount any candidate on just one factor, because we all have different weaknesses and strengths. That’s why I consider these assessment questions instead of must-haves.
This is especially true of SQL questions in interviews. I am way more interested in their thought process and how they come up with an SQL query than I am the query they respond with. I’m not testing whether they have SQL syntax memories; I’m testing whether they understand how relational data can be joined and aggregated and filtered to produce the desired results.