Interview Questions

  • Justin, if it helps, I never use "pop quiz" questions when I interview because I find that they don't give me enough information about a candidate's experience or ability to learn or what their interests are. Instead, I try to ask open-ended questions. You can still weed out people who lie about their experience because they won't be able to answer these questions either.

    For example:

    "What databases/versions have you worked with?" If the candidate mentions two different things like DB2 and SQL Server, I'll ask "Which one did you like better? What was something you found easy in SQL Server that was more challenging in DB2?" [My answer would be about the fact that the DB2 version was extremely outdated, so I wasn't able to use a Split function in DB2, but I found 3 ways around that.] Or if they mention two versions of SQL Server, I'll ask "What were your favorite improvements between 2005 and 2008?" [My answer would be intellisense, but that since you have to have at least Management Studio 2008 and SQL Server 2008 to take advantage of intellisense, I was unfortunately only ever able to do that for one project.]

    I never ask obvious yes/no questions but I get them a lot at interviews. "Do you work well both on a team and independently?" YES! "Can you work off of specs?" YES!

  • julian.fletcher (6/5/2014)


    I work for a company of about 50 people in Oxford and am involved in the recruitment process - we're looking for developers with at least a couple of years' experience in SQL and C#. Part of the process involves asking the candidate a couple of SQL questions, questions which we think aren't too tricky and which shouldn't prove to be too difficult for the sort of people we're looking for. And yet ... we're constantly surprised (and disappointed) how badly most people do. Although the occasional interviewee does answer without any trouble (and usually ends up with a job offer!), we were wondering if the questions are Just Too Difficult.

    Julian, I've been loosely involved in recruiting in your catchment area a number of times in the last five years or so and your experience is fairly typical. You may be able to cut down on your costs by using brief phone interviews, which are generally cheaper to conduct than f2f. Start with this one...

    Jeff Moden (6/6/2014)


    julian.fletcher (6/5/2014)


    And yet ... we're constantly surprised (and disappointed) how badly most people do.

    You said a mouthful, there. If you really want a surprise, add just one more question. Ask "Using T-SQL, how do you get the current date and time"?

    You've mentioned this one before a couple of times, Jeff. Here in Maidenhead, not too far from Oxford, we recently had a small recruitment campaign and we were able to put this little gem to the test. Man, you were bang on. There was a fail rate of about 15%.

    Perhaps 75% of the candidates couldn't adequately describe the difference between inner and outer joins - and of course, every last one of them described themselves as a "TSQL Expert".

    β€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • Thanks very much for all your comments - greatly appreciated that you've taken the time. As far as answers go, this is what we're looking for:

    Question #1

    1 1 1 21

    1 2 1 21

    1 1 1 21

    1 2 1 21

    1 1 1 21

    1 2 1 21

    1 1 1 21

    1 2 1 21

    2 1 Null Null

    Most people usually get the first three correct but fail on the fourth.

    Question #2

    "The surnames of all people over 60 years old." Everybody gets this, eventually.

    Bonus point (never yet awarded) for noting that they don't give exactly the same answer (as alluded to above).

    The second is likely to be better for performance, assuming there's an index on the DateOfBirth column. We usually have to prompt to get this.

    Question #3

    "Maintain an updated date column on the table." Everybody gets this, eventually.

    Bonus point (occasionally awarded) for mentioning there might be a recursion problem.

    But we're really looking for the fact it will fail for an update of multiple rows. It's unusual for people to see this without a fair bit of prompting.

    Once we've got that far, most people say that the solution would be to join to inserted in the update (or have "WHERE EmployeeID IN (SELECT ...").

    I should have said that we're looking for developers to work on all parts of a particular product; both the C# and the SQL. We're not big enough to be able to have separate teams for each.

    Asking how to get the current date and time might be a good way to break the ice - thanks. I might use it next time. But I think asking a candidate how they would create and populate a temp table with sequential integers from 1 to a million would just be too difficult given that most can't answer our simple three questions. And yes, this is after we've had an initial telephone interview.

    Julian.

  • Ask "Using T-SQL, how do you get the current date and time"?

    So would you consider this a valid answer? "I think it's CURRENT TIMESTAMP but if I was blanking on it I'd google it to be sure."

    I've worked with so many language that sometimes I mix them up, so I often google things even if I know them. And sometimes even when I "know" something, a quick search reminds me of something I forgot. IMO, knowing how to find the information you need is just as valuable as already knowing it. And double checking yourself is a good skill too. If you've never forgotten a simple piece of syntax, then you never had a baby who didn't sleep through the night.

  • kimberly_lehman (6/6/2014)


    Ask "Using T-SQL, how do you get the current date and time"?

    So would you consider this a valid answer? "I think it's CURRENT TIMESTAMP but if I was blanking on it I'd google it to be sure."

    I've worked with so many language that sometimes I mix them up, so I often google things even if I know them. And sometimes even when I "know" something, a quick search reminds me of something I forgot. IMO, knowing how to find the information you need is just as valuable as already knowing it. And double checking yourself is a good skill too. If you've never forgotten a simple piece of syntax, then you never had a baby who didn't sleep through the night.

    That might keep me from ending the interview but it would be an indication that the person really hasn't worked with T-SQL that much because it's one of those fundamental things like knowing what a SELECT is used for. Based on the response above, I'd ask if they knew what "Books Online" is and how to get to it. I'm amazed at how many people don't know that, either.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • julian.fletcher (6/6/2014)


    .. I should have said that we're looking for developers to work on all parts of a particular product; both the C# and the SQL. We're not big enough to be able to have separate teams for each...

    Shame...I'm nice, I work bl00dy hard, I'm available in two weeks and I'm 25 minutes from Oxford πŸ˜‰

    β€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • kimberly_lehman (6/6/2014)


    Ask "Using T-SQL, how do you get the current date and time"?

    So would you consider this a valid answer? "I think it's CURRENT TIMESTAMP but if I was blanking on it I'd google it to be sure."

    I've worked with so many language that sometimes I mix them up, so I often google things even if I know them. And sometimes even when I "know" something, a quick search reminds me of something I forgot. IMO, knowing how to find the information you need is just as valuable as already knowing it. And double checking yourself is a good skill too. If you've never forgotten a simple piece of syntax, then you never had a baby who didn't sleep through the night.

    I believe GETDATE() is specific to T-SQL and CURRENT_TIMESTAMP is ANSI SQL function.

    I think still learning

    ***SQL born on date Spring 2013:-)

  • You could potentially miss out on some great employees if you let your ego get in the way of making an objective hiring decision. I've been working with T-SQL for over 10 years and I've helped to make a lot of money for the companies I've worked for. I've also had a very wide variety of experience which I think makes me a valuable asset, but it also means that I don't have to write that particular piece of code frequently enough to have it memorized. I don't mind admitting that I don't know everything. I figure out what I don't know.

  • kimberly_lehman (6/6/2014)


    You could potentially miss out on some great employees if you let your ego get in the way of making an objective hiring decision. I've been working with T-SQL for over 10 years and I've helped to make a lot of money for the companies I've worked for. I've also had a very wide variety of experience which I think makes me a valuable asset, but it also means that I don't have to write that particular piece of code frequently enough to have it memorized. I don't mind admitting that I don't know everything. I figure out what I don't know.

    That seems valid. However, if you're trying to get a T-SQL developer job, you should at least prepare to don't confuse most functions. I've interviewed some people who claim to have worked with Oracle who presented for SQL Server and wouldn't get correct the Oracle or the Sql Server option.

    Most people won't be able to differentiate inner joins from outer joins and some even consider left join different from outer join.

    If you've worked over 10 years with SQL Server, you should know that most answers are on BOL and you don't even need Google. I worked for a company for 5 years using SQL Server and made them make a lot of money but that didn't make me good on T-SQL, it only made me an "Expert Beginner".

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Good thing this wasn't a pop quiz on the difference between "your" and "you're".

  • dotnetkim (6/6/2014)


    Good thing this wasn't a pop quiz on the difference between "your" and "you're".

    LOL :hehe: My fault.

    I know the difference, I'm not sure why did I write it wrong this time.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Q1 is simple enough and is simple join techniques, I wouldn't expect to see any issues there.

    Q2 requires people to know about SARGability. While a definite skill I'd like to see in an applicant, I find many are largely clueless.

    Q3 requires them to know the possible implications of recursive triggers and a little more detail to deal with interview nerves. A simple inclusion: We bulk update this table.

    I personally don't find these questions overly difficult, but only the first one is a "book" question. The rest are experience questions.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • ChrisM@Work (6/6/2014)


    julian.fletcher (6/6/2014)


    .. I should have said that we're looking for developers to work on all parts of a particular product; both the C# and the SQL. We're not big enough to be able to have separate teams for each...

    Shame...I'm nice, I work bl00dy hard, I'm available in two weeks and I'm 25 minutes from Oxford πŸ˜‰

    And bloody damned good at SQL, to boot!

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • dotnetkim (6/6/2014)


    Good thing this wasn't a pop quiz on the difference between "your" and "you're".

    If I'm trying to hire a proof reader, I might care. If I need someone that's good in SQL Server, I wouldn't care. πŸ˜‰ It's a common typo.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • thomashohner (6/6/2014)


    kimberly_lehman (6/6/2014)


    Ask "Using T-SQL, how do you get the current date and time"?

    So would you consider this a valid answer? "I think it's CURRENT TIMESTAMP but if I was blanking on it I'd google it to be sure."

    I've worked with so many language that sometimes I mix them up, so I often google things even if I know them. And sometimes even when I "know" something, a quick search reminds me of something I forgot. IMO, knowing how to find the information you need is just as valuable as already knowing it. And double checking yourself is a good skill too. If you've never forgotten a simple piece of syntax, then you never had a baby who didn't sleep through the night.

    I believe GETDATE() is specific to T-SQL and CURRENT_TIMESTAMP is ANSI SQL function.

    I think still learning

    Now, that's the kind of answer that I'd expect from someone applying for a Senior position. I'd also expect them to just automatically cough up some extra info about UTC dates and times, etc. If they just say "GETDATE()" or just "CURRENT_TIMESTAMP", then they're probably not at the level I'm looking for for a Senior SQL Developer or a Senior DBA. Either is fine for a front-end developer position but they'd better know one of the two for a Senior front-end position that requires "some knowledge of SQL".

    Like I said, you can tell a whole lot by asking questions at the start.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 16 through 30 (of 48 total)

You must be logged in to reply to this topic. Login to reply