Interview Questions

  • Sean Lange (6/10/2016)


    [quote-0Well on the same line of trying to determine if this is a good question or not, maybe not everybody does queries with aggregation either. The argument against string manipulation just doesn't hold up to scrutiny. As with any element of sql server, or even just t-sql, there is the possibility that somebody really experienced doesn't have any experience in some area. I would never use only a single question anyway, that would be silly. I would honestly be shocked if there was somebody who as you say is really experienced and maybe doesn't do a lot of string manipulation couldn't solve such a simple question.

    [/quote-0]

    I'm thinking once we discount aggregation as an important topic of relational database functionality then the thread has ventured into territory that is less than the level of enlightenment I'm in favor of. BUT THATS JUST LIKE MY OPINION MAN!!!!

    :hehe::hehe::hehe::hehe::hehe::hehe::hehe:

  • patrickmcginnis59 10839 (6/10/2016)


    Sean Lange (6/10/2016)


    [quote-0Well on the same line of trying to determine if this is a good question or not, maybe not everybody does queries with aggregation either. The argument against string manipulation just doesn't hold up to scrutiny. As with any element of sql server, or even just t-sql, there is the possibility that somebody really experienced doesn't have any experience in some area. I would never use only a single question anyway, that would be silly. I would honestly be shocked if there was somebody who as you say is really experienced and maybe doesn't do a lot of string manipulation couldn't solve such a simple question.

    [/quote-0]

    I'm thinking once we discount aggregation as an important topic of relational database functionality then the thread has ventured into territory that is less than the level of enlightenment I'm in favor of. BUT THATS JUST LIKE MY OPINION MAN!!!!

    :hehe::hehe::hehe::hehe::hehe::hehe::hehe:

    LOL. Maybe we discount all apsects of t-sql so everybody can be a winner?!?!?!?!? :-D:-D:-D:-D

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Sean Lange (6/10/2016)


    LOL. Maybe we discount all aspects of t-sql so everybody can be a winner?!?!?!?!? :-D:-D:-D:-D

    yay! everyone gets a ribbon for interviewing!

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Eric M Russell (6/9/2016)


    Sean Lange (6/9/2016)


    Eric M Russell (6/9/2016)


    patrickmcginnis59 10839 (6/9/2016)


    Eric M Russell (6/7/2016)


    Luis Cazares (6/7/2016)


    Was I too late for April fools' day?

    This is what happens when you trust a forum to answer questions that you should answer on your own.

    I could have given a real answer, but this is an example of the reasons behind my disclaimer. I wouldn't want someone that uses something without at least understanding how it works or at least point to some documentation for it.

    If I was interviewing this person, I wouldn't mind if the answer is incorrect as long as it demonstrates knowledge on string manipulation and creativity to solve problems.

    I personally would put string manipulation using T-SQL in the same category as programming a row-by-row cursor; I don't consider it to a core competency for a T-SQL developer. I'd ask questions about joining, grouping, ranking, indexing, isolation, and execution plans before I would test someone's knowledge about string manipulation, but then again I'm typically sitting in on a panel interview and can only ask maybe a half dozen questions. So I typically bypass the Programming 101 stuff and zoom in on what I really expect from senior level database developer.

    It's a good topic for a forum discussion, I'm just saying it's not a good interview question within the context of a SQL Server Developer/DBA position.

    In my opinion I think this is a pretty reasonable position to hold, I might not be able to provide the file part of a path in an interview despite having done it in production simply because if I don't routinely use a function, theres a good chance I'm going to have to look up the function definition and parameters. I do realise that this could cost me in interviews though, but if I have to produce code without using language references I might not be a great match for that position so I guess it would work out anyways 🙂

    As a programming language, SQL suffers from the same plight as HTML, there are a lot of people who claim to know how to use it, fewer people have practical experience, and very few can craft SQL at a professional level.

    If hiring someone to write T-SQL code, I want them to know:

    - normalization

    - how to solve problems using set based logic

    - logical joins (inner, outer, cross)

    - how locking, isolation level, and blocking works

    - the difference bertween a covered and non-covered index and why it matters

    It can take years of practical experience to learn that, and when you find someone who understands at that level, then you want to hire them. Beyond that; it's also helpful if the candidate has industry domain knowledge, which again takes years to accumnulate.

    But string manipulation; that's a 2 minute lookup on Google.

    But for anybody who actually writes sql it is so trivial it shouldn't be an issue at all. I tend to side with Jeff on this one. As an early question in an interview it isn't bad at all. In fact, I wouldn't even care really if the result was correct. If they can just rattle off a few string manipulation functions with zero thought then you can immediately tell they have actually done this stuff. If this is somebody writing code I would like to know they are fluent right out of the gate. If they couldn't at least come up with something reasonable I don't care how much they know about the rest of the valid items you listed. As a code writer if you can't handle the 101 or maybe 201 you are not likely going to be a very strong candidate.

    It is a trivial question in the sense that it can be easily googled, however, not everyone, even a very experienced T-SQL programmer routinely does string manipulation, so that's why I think it's a poor question for guaging a canididates proficiency with T-SQL.

    Here is an actual T-SQL related question that I sometimes ask at some point near the end of the interview.

    Let's assume we have a table called CustomerContact which contains two columns: CustomerID and ContactDate. I want you to write a SQL select statement that returns one row for each customer who was contacted three or more times within the month of November 2015. The columns returned should be: CustomerID, the total number of times the customer was contacted within that month, and the last contact date for the customer within that month.

    What I expect from the candidate is something equivalent to the following:

    select CustomerID, count(*) as ContactCount, max(ContactDate) as LastContactDate

    from CustomerContact

    where ContactDate >= '2015/11/01'

    and ContactDate < '2015/12/01'

    group by CustomerID

    having count(*) >= 3;

    It tests several different concepts within context, but it's still simple enough that a good developer will immediately understand what is being asked and know the solution. It also resembles the type of SQL problem the candidate would be expected to routinely solve on the job. If the candidate asks, I'll write it out on the white board, but really an experienced developer will know what to do just by lintening closely. If all I get back is crickets chirping, then they've failed. They simply couldn't survice Day 1 on the job, because this is exactly the type of requests that will come from the internal clients. How the candidate solves or responds to this question tells a lot.

    My proposed q earlier on test scores was along very similar lines, just more advanced.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Eric M Russell (6/7/2016)


    They're asking the wrong type of questions for a job interview.

    I'm not saying that string manipulation is a bad question. It's just that for a one hour interview I'm splitting my time between one or two other interviewers, and I only get a chance to ask maybe a half dozen questions. So, I'd rather rather ask a quesion similar to one of the examples I provided earlier that digs deeper into their past experience. There are plenty of folks who actually good T-SQL coders, but for whatever reasons they can't understand the questions we're asking or can't "think on their feet". If I ask someone "Explain the difference between locking, blocking, and deadlocking" or "Explain why it's potentially a bad idea to place a function in a WHERE clause expression", and they fumble without providing an coherent intermediate level answer, then at that point I lose interest can couldn't care less whether they can slice and dice strings. I don't interview interns.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • Eric M Russell (6/10/2016)


    Eric M Russell (6/7/2016)


    They're asking the wrong type of questions for a job interview.

    I'm not saying that string manipulation is a bad question. It's just that for a one hour interview I'm splitting my time between one or two other interviewers, and I only get a chance to ask maybe a half dozen questions. So, I'd rather rather ask a quesion similar to one of the examples I provided earlier that digs deeper into their past experience. There are plenty of folks who actually good T-SQL coders, but for whatever reasons they can't understand the questions we're asking or can't "think on their feet". If I ask someone "Explain the difference between locking, blocking, and deadlocking" or "Explain why it's potentially a bad idea to place a function in a WHERE clause expression", and they fumble without providing an coherent intermediate level answer, then at that point I lose interest can couldn't care less whether they can slice and dice strings. I don't interview interns.

    Ah... got it and now I understand where you're going with all of this and, in that case, I absolutely agree.

    Most of the people I've had the great displeasure of interviewing don't make it past the 15 minute mark. I just don't have the time to dedicate past the first 3 questions if they don't even come close to correct answers on those first 3 questions. And, remember, the first question is always "How do you get the current date and time using T-SQL?" whether it's for a DBA or an Developer position. The other two vary but are never in the "SQL Ninja" category.

    It's been really slim pickings here in this part of the U.S.A.

    --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)

  • Jeff Moden (6/10/2016)


    And, remember, the first question is always "How do you get the current date and time using T-SQL?" whether it's for a DBA or an Developer position.

    Now, imagine somebody of your skills coming to your interview and getting this question.

    If you'd get such a question - would you hesitate before answering?

    What would go through your mind?

    What kind of question is it?

    What do they mean?

    It cannot be so trivial, there must be something else they want. But what?

    What do they think of me of my level if they asking so dumb questions?

    If this question is somehow relevant to the job I'm gonna have to do - how low level would it be?

    What kind of people have they already hired if that's what they test my knowledge for?

    How many minutes before I'm gonna get bored on this job?

    Should I even bother answering this question?

    You know, it's a lot to consider before answering an initial question of an interview "How do you get the current date and time using T-SQL?". And it has very little to do with T-SQL knowledge of the candidate.

    Remember, every interview goes both ways.

    It's not only the interviewer who's evaluating the other party.

    _____________
    Code for TallyGenerator

  • Sergiy (6/12/2016)


    Jeff Moden (6/10/2016)


    And, remember, the first question is always "How do you get the current date and time using T-SQL?" whether it's for a DBA or an Developer position.

    Now, imagine somebody of your skills coming to your interview and getting this question.

    If you'd get such a question - would you hesitate before answering?

    What would go through your mind?

    What kind of question is it?

    What do they mean?

    It cannot be so trivial, there must be something else they want. But what?

    What do they think of me of my level if they asking so dumb questions?

    If this question is somehow relevant to the job I'm gonna have to do - how low level would it be?

    What kind of people have they already hired if that's what they test my knowledge for?

    How many minutes before I'm gonna get bored on this job?

    Should I even bother answering this question?

    You know, it's a lot to consider before answering an initial question of an interview "How do you get the current date and time using T-SQL?". And it has very little to do with T-SQL knowledge of the candidate.

    Remember, every interview goes both ways.

    It's not only the interviewer who's evaluating the other party.

    Yes, understood and I might agree except that I left out a little information about how I conduct interviews.

    Since I've been "in the chair" more than once myself (although I don't ever remember being particularly nervous) and have also conducted dozens of interviews (not as many as some but certainly enough to easily spy a white-knuckler), I do understand that a lot of people really have the jitters during an interview. With that in mind and prior to asking any questions, I always tell the interviewee to relax (whether I think they are nervous or not) and that I don't ask any trick questions, man-hole cover questions, or questions with a hidden meaning and that I understand that they might be a little nervous. Then I explain that we'll start off with some really simple questions just to break the ice and that they should go for the obvious answer and that we'll gradually ramp up after that. Then I ask "For example, how do you get the current date and time in T-SQL"?

    If they're thinking all the things that you mentioned after my brief explanation of how the interview will be conducted, then I'm not sure that I want them because they can't identify when something is simple. Even if they are thinking all that on the first question, they won't be as the interview progresses, especially the part about how soon they might get bored. 😉 The most common answers to the question have been functions from Excel, Access, and lord knows what else or someone saying they've never had to do such a thing before. We're not talking about rookies here. We're talking about people that have it on their resume that they have over 5 years experience (many claim 10) with SQL Server and they ARE applying for a Senior position, many of which pay over six figures.

    Despite my serious disappointment, I do continue the interview (except for once) but that first question has always correctly indicated how the rest of the interview is going to go when they get that question wrong or can't answer. For example, after claiming he's never had to get the current date and time before, I asked one fellow to tell me what he knew of clustered indexes. His answer was, and I quote... "I've never worked on clustered servers before so I've never had to work with clustered indexes". This fellow also claimed 10 years of performance tuning experience on stored procedures, views, functions, and triggers.

    My interviews aren't high pressure or tricky by any means. My goal is simply to find out what they know about SQL Server or T-SQL If they think ill of me for asking a simple ice breaker question after I told them I was going to start off with simple questions, that's fine. Just imagine what I think of them for not being able to answer something any real first year cadet could answer no matter what jitters they may be suffering especially since they claim years of experience and are applying for a Senior position be it DBA or Developer.

    --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)

  • Man, I can only say - you're dealing with some seriously screwed people. 🙂

    Of course, I cannot know how you define the atmosphere on your interviews, how do you recognise human characters in front of you.

    I could only see the "initial question" as it's written.

    And if it would be asked "straight into the forehead", just to start somewhere - well, there would be some thoughts. 😉

    To an excuse of those cheaters I can only mention an advertised job description which required at least 5 years of practical experience with SQL2008. I read it somewhere close to the end of 2010.

    I wonder how many CV's matching the criteria have they received. :hehe:

    _____________
    Code for TallyGenerator

  • Sergiy (6/12/2016)


    Man, I can only say - you're dealing with some seriously screwed people. 🙂

    Fakers and Posers and Shammers, Oh my! 😀

    Of course, I cannot know how you define the atmosphere on your interviews, how do you recognise human characters in front of you.

    By asking them how to get the current date and time in T-SQL. 😀

    I could only see the "initial question" as it's written.

    And if it would be asked "straight into the forehead", just to start somewhere - well, there would be some thoughts. 😉

    Understood. At face value and missing the lead-in to all that, it seems brutal. I originally starting asking the question just to demonstrate to the interviewee that I don't ask trick questions. Who knew it would be the defining indication of how things would go? I'm more surprised about it than anyone I know.

    To an excuse of those cheaters I can only mention an advertised job description which required at least 5 years of practical experience with SQL2008. I read it somewhere close to the end of 2010.

    Heh... yeah. Those are always a joy. Such job descriptions must be written by people who failed the first question during an interview. :hehe:

    I wonder how many CV's matching the criteria have they received. :hehe: To flip that over on resumes, I know I'm in for a fun ride during the interview when someone claims experience in SQL Server 2010 and 2013 on their resume. I tell the managers sponsoring the interview to not even bother but I'm frequently overridden and we have the interview, anyway. The results are always the same. Disaster and waste of time. The managers are finally starting to come around but it has taken a lot of "See? I warned you!". The reason why I always go to such predicted disasters is to keep those managers from making a hiring mistake. They easily distracted by even dim lights. :w00t:

    --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)

  • Jeff Moden (6/10/2016)


    Eric M Russell (6/10/2016)


    Eric M Russell (6/7/2016)


    They're asking the wrong type of questions for a job interview.

    I'm not saying that string manipulation is a bad question. It's just that for a one hour interview I'm splitting my time between one or two other interviewers, and I only get a chance to ask maybe a half dozen questions. So, I'd rather rather ask a quesion similar to one of the examples I provided earlier that digs deeper into their past experience. There are plenty of folks who actually good T-SQL coders, but for whatever reasons they can't understand the questions we're asking or can't "think on their feet". If I ask someone "Explain the difference between locking, blocking, and deadlocking" or "Explain why it's potentially a bad idea to place a function in a WHERE clause expression", and they fumble without providing an coherent intermediate level answer, then at that point I lose interest can couldn't care less whether they can slice and dice strings. I don't interview interns.

    Ah... got it and now I understand where you're going with all of this and, in that case, I absolutely agree.

    Most of the people I've had the great displeasure of interviewing don't make it past the 15 minute mark. I just don't have the time to dedicate past the first 3 questions if they don't even come close to correct answers on those first 3 questions. And, remember, the first question is always "How do you get the current date and time using T-SQL?" whether it's for a DBA or an Developer position. The other two vary but are never in the "SQL Ninja" category.

    It's been really slim pickings here in this part of the U.S.A.

    And the reply should be "Do you mean current server-time, or current UTC, or some sort of localized current time?"

    Clear requirements make better code.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • I do ask trick questions. One of my standard tech-screening questions is:

    And here's the trick question: You have two tables, A and B, and you want all the rows from A, plus the data from B that matches rows in A, for any rows with a matching ID. How do you do that?

    I ask this right after a series of complex, advanced questions on indexing.

    About half reply hesitantly, "Ummm .... Left Join?". Most of the rest laugh and reply "Left Join". A very small minority struggle with it and try to overcomplicate it.

    It's not really in there as a technical question. It's in there to break the mood after some heavy questions.

    I'll also ask:

    Okay. Now to the really advanced stuff. What's your name?

    But I'm easily amused.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • GSquared (6/14/2016)


    I do ask trick questions. One of my standard tech-screening questions is:

    And here's the trick question: You have two tables, A and B, and you want all the rows from A, plus the data from B that matches rows in A, for any rows with a matching ID. How do you do that?

    I ask this right after a series of complex, advanced questions on indexing.

    About half reply hesitantly, "Ummm .... Left Join?". Most of the rest laugh and reply "Left Join". A very small minority struggle with it and try to overcomplicate it.

    It's not really in there as a technical question. It's in there to break the mood after some heavy questions.

    I'll also ask:

    Okay. Now to the really advanced stuff. What's your name?

    But I'm easily amused.

    I wouldn't even consider that a trick question. The thing is, that's exactly the type of request you'll routinely get from the business or end users, except substitute Tables A and B for the names of actual tables. To be effective in one's day to day job as a T-SQL developer, you have to be able to parse stuff similar to that (only more complex) in your head mid conversation, immediately know what they're asking for is an OUTER JOIN query, and then followup with questions about what specific columns or filtering they need to go along with it. You'll rarely ever be asked pop quiz style questions like "What is a clustered index?" or "How do you get the current date and time?", unless part of your job involves mentoring an intern.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • Eric M Russell (6/14/2016)


    GSquared (6/14/2016)


    I do ask trick questions. One of my standard tech-screening questions is:

    And here's the trick question: You have two tables, A and B, and you want all the rows from A, plus the data from B that matches rows in A, for any rows with a matching ID. How do you do that?

    I ask this right after a series of complex, advanced questions on indexing.

    About half reply hesitantly, "Ummm .... Left Join?". Most of the rest laugh and reply "Left Join". A very small minority struggle with it and try to overcomplicate it.

    It's not really in there as a technical question. It's in there to break the mood after some heavy questions.

    I'll also ask:

    Okay. Now to the really advanced stuff. What's your name?

    But I'm easily amused.

    I wouldn't even consider that a trick question. The thing is, that's exactly the type of request you'll routinely get from the business or end users, except substitute Tables A and B for the names of actual tables. To be effective in one's day to day job as a T-SQL developer, you have to be able to parse stuff siilar to that (only more complex) in your head and immediately know what they're asking for is an OUTER JOIN query. You'll rarely ever be asked pop quiz style questions like "What is a clustered index?" or "How do you get the current date and time?", unless you're mentoring an intern.

    The point is that it's only a trick question because I say it's one, when it really isn't.

    It would be a valid question, as you mention, early in a screening. But by the time I get to it, I've already filtered out anyone who can't come up with Outer Join. What I'm testing for is the ability to deal with the human aspect of it.

    The people who fail this question aren't failing because of the technical aspect of it. They're failing because I said "trick question" and they then overthink it because of that.

    One of the worst phenomena I run into is people who hear what they think you should have said, rather than hearing what you actually said.

    I lead in with the words "trick question", and a certain percentage of people immediately go defensive and then dub in "he must not mean what he asked, he must mean something else", and then try to figure-figure-figure out what the deeper meaning is. There isn't one, so they go into mental vapor-lock.

    I've had such people literally argue, "Well, sure, you didn't actually say that, but it's what you meant!"

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • My advanced knowledge, "tricky" q is:

    In autocommit mode, when can an UPDATE statement partially complete, some UPDATEs made, some not, where SQL does not roll it back?

    Edit: And assuming you don't have CATCH logic to handle the issue.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 46 through 60 (of 111 total)

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