Challenging SQL interview questions

  • Jeff Moden (4/6/2009)


    GSquared (4/6/2009)


    Jeff Moden (4/6/2009)


    Here's a perfect example...

    http://www.sqlservercentral.com/Forums/Topic688949-8-1.aspx

    My answer would have been... "Thanks for the setup code... please post the code that you've tried so far so we can point you in the right direction."

    Whereas I thought the problem was interesting enough to just plain go for it.

    Different approaches for different folks.

    Just in case... I hope you don't think that was directed at you personally, Gus. It wasn't meant to be... especially since I've done the very same thing in the past.

    Of course I thought it was directed at me! But there's a big difference in that, and assuming it was meant to offend/belittle/whatever. I assume it wasn't.

    Like I said, different approaches for different folks. Heck, sometimes different approaches for the same person on different days.

    You made the point that sometimes it's best to leave a question alone, or to provide guidance on finding their own answers. I made a point that sometimes it's more fun to take the challenge (big or little) and work out an answer directly. Both valid, true, necessary points.

    - 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

  • GilaMonster (4/6/2009)


    Paul White (4/6/2009)


    My entirely personal view is that if someone is able to talk a little about things like the 'halloween problem' in an interview, it shows they have an interest in the internal workings of database engines

    My opinion is that there's a difference between questions for 'extra credit' and questions that result in an immediate fail if the candidate can't answer. Questions on Halloween protection, database page structure, the allocation mechanisms in the database, NTFS IO details, protocol descriptions, steps the engine follows to execute a query, etc are fine as the former, but not as the latter unless the job is to write a database engine.

    I've seen and heard of too many cases where the interview asks those kind of questions to make themselves look smart rather than to see how much the candidate knows, or to make the candidate feel like an idiot.

    I had an interview a couple of years ago where the lead DBA grilled me for a couple of hours over the phone on architecture and database design, and got very excited about working with me, since he knew more about maintenance and recovery and disaster prevention than I did, while I knew more about performance tuning, architecture, data modeling, etc., than he did. Then, the next day, had another interview with the CTO and the junion DBA, and they spent 3 hours grilling me on the internal workings of DTS (not on how to build a functional package; on the details of how it works behind the scenes) and on DBCC commands. Since I don't memorize DBCC commands (why would I?), I didn't get that job.

    It was, in my opinion, a very strange interview process.

    - 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

  • The 2nd question has nothing to do with SQL, either. It's about a "tabular file".

    --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 (4/7/2009)


    The 2nd question has nothing to do with SQL, either. It's about a "tabular file".

    Though you could certainly accomplish the desired end-result through T-SQL. Either import and handle in tables, or use OpenRowset to query directly.

    - 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

  • RBarryYoung (4/4/2009)


    Why would our helping you to get a job that you are apparently unqualified for be a good thing?

    That wasn't harsh.

    My first reply on this thread below wasn't harsh either, but my second one had a little more edge to it:

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=75335

  • GSquared (4/7/2009)


    It was, in my opinion, a very strange interview process.

    G2, the first guy sounds quite cool, but from the second experience, I would guess you had a lucky escape! 🙂

  • Paul White (4/7/2009)


    GSquared (4/7/2009)


    It was, in my opinion, a very strange interview process.

    G2, the first guy sounds quite cool, but from the second experience, I would guess you had a lucky escape! 🙂

    Yep. And got a job with better pay and benefits than they were offering, one week later. Overall, very good deal for me.

    - 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

Viewing 7 posts - 46 through 51 (of 51 total)

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