Analytical Interview Questions

  • Hi All,

    My company is looking to hire new SQL develoeprs.

    What are some good analytical questions that we can ask a candidate to get an idea of how they think or work through processes?

    Thanks in afvance

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • Hi,

    Below iam giving some interview Questions on Sql Server

    1.Referentail integrity

    2.Types of Indexes(Perfermence Wise Which is better)

    3.Types of Joins

    4.What are temperory tables.(perfermence wise cursors r Temperory Tables which are better)

    5.What is CTE(Common Table Expression) in Sql Server.

    6.What are Derived Tables.

    7.What are Views.

    8.Diff between Stored Procedures and Stored Functions.

    9.Types of triggers.

    10.Types of Cursors.

    so on .,......

    RC

  • Thanks for that.

    I'm actually look for more of an Analytical question rather than tech skills questions...

    For example giving them puzzles to see what there approach to problem solving is like.

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • For SQL Programming/Analytical questions Some of the standard ones are:

    1) How to Find top 3 maximum values in a column (ANS using TOP clause with ASC)

    2) Reverse the characters of a name and print them out (If name is Jack -> Then output shall be kcaJ)

    3) Write a query to Find and eliminate duplicate values (i.e. one sol', would be to use Group BY, HAVING COUNT(*)>1 Clause)

    4) Print results from two tables having uncommon values using JOINS(If TabA has 1,2,3,4 Values and TabB has Values 2,3,4,5,6 only 1 and 6 should be the output)(This would demonstrate knowledge of JOINS)

  • There are two rooms separating by a wall, one room has three lamps, the one one has three switches, can you tell how to find out which switch is for which lamp if you only allow to look at other room once. (Question from Bill Gates, he said if anyone can answer this question in five minutes, he would hire that person.) So far I asked many people this question, only one guy could answer this question within 5 minutes, he was a geek though.

  • Loner (7/11/2008)


    There are two rooms separating by a wall, one room has three lamps, the one one has three switches, can you tell how to find out which switch is for which lamp if you only allow to look at other room once. (Question from Bill Gates, he said if anyone can answer this question in five minutes, he would hire that person.) So far I asked many people this question, only one guy could answer this question within 5 minutes, he was a geek though.

    Well, first time that I have heard this one (honest). Here is what I would do: turn the first switch on, turn the second switch off, and disassemble the third switch and wire a disconnect timer into it, set it for one minute, and turn the switch on.

    Then go to the Lamp Room and wait 1 minute. The lamp that was on the whole time is switch 1, the lamp that was off the whole time is switch 2, and the one that was on but turned off is switch 3.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • If you subscribe to SQL Server Magazine, they have very interesting puzzles almost every month by author Itzik Ben Gun. I like them, I could solve just few of them.

  • Well, according to Bill Gates, the answer was:

    1. Turn on the first switch, wait 20 minutes.

    2. Turn on the second switch.

    3. Go to the other room, the lighted lamp that was really hot belonged to the first switch, the lighted lamp that was not hot belonged to the second switch, the other lamp that was not lighted belonged to the third switch.

  • My company's interviews are almost purely knowledge-interrogation. Some candidates have literally walked out or reverted to a bitter attitude when getting stumped on easy-to-moderate questions.

    1) How to Find top 3 maximum values in a column (ANS using TOP clause with ASC)

    2) Reverse the characters of a name and print them out (If name is Jack -> Then output shall be kcaJ)

    3) Write a query to Find and eliminate duplicate values (i.e. one sol', would be to use Group BY, HAVING COUNT(*)>1 Clause)

    4) Print results from two tables having uncommon values using JOINS(If TabA has 1,2,3,4 Values and TabB has Values 2,3,4,5,6 only 1 and 6 should be the output)(This would demonstrate knowledge of JOINS)

    My company regularly asks questions like these. Haven't heard about anything of the #2 type being asked (string manipulation). My boss doesn't like candidates that knows too much about cursors though.

    1.Referentail integrity

    2.Types of Indexes(Perfermence Wise Which is better)

    3.Types of Joins

    4.What are temperory tables.(perfermence wise cursors r Temperory Tables which are better)

    5.What is CTE(Common Table Expression) in Sql Server.

    6.What are Derived Tables.

    7.What are Views.

    8.Diff between Stored Procedures and Stored Functions.

    9.Types of triggers.

    10.Types of Cursors.

    These get asked a lot.

  • rameshchandra.a (7/11/2008)


    4.What are temperory tables.(perfermence wise cursors r Temperory Tables which are better)

    If a WHILE loop is involved, then each will suck as bad as the other

    5.What is CTE(Common Table Expression) in Sql Server.

    It helps people who don't know how to write T-SQL. 😛

    8.Diff between Stored Procedures and Stored Functions.

    One is real, the other is not... they're called "User Defined Functions"...😉

    10.Types of Cursors.

    Two types... good maintenance cursors that control setbased processes written by a DBA... and bad. :hehe:

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

  • Loner (7/11/2008)


    There are two rooms separating by a wall, one room has three lamps, the one one has three switches, can you tell how to find out which switch is for which lamp if you only allow to look at other room once. (Question from Bill Gates, he said if anyone can answer this question in five minutes, he would hire that person.) So far I asked many people this question, only one guy could answer this question within 5 minutes, he was a geek though.

    Judging by all the idiots that answered that question successfully that I've seen get hired over the years and still can't write SQL without cursors, while loops, and CLRs, I'd say that those types of questions are totally useless. If you want to find out how they think when programming... ask them some SQL questions...

    ... and see if the geek know's how to do it with 4 or even 5 lights 😉

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

  • Christopher Stobbs (7/11/2008)


    Thanks for that.

    I'm actually look for more of an Analytical question rather than tech skills questions...

    For example giving them puzzles to see what there approach to problem solving is like.

    Part of the tech skills an SQL Developer should have is how to analyze, solve, and write SQL questions. The only way to find out if they can analyze a problem to materialize as an SQL solution is to give them problems that require the answer as an SQL Script.

    Asking questions like "Which one of the following is different" are just going to get you a lot of obvious answers that have nothing to do with SQL and have nothing to do with problem solving even though the question has a lot to do with analysis...

    Yellow Apple

    Orange

    Lime

    Tomato

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

  • If you want an analytical question, this was the one I had to answer when I interviewed for a contracting position. Actually this was the problem they had and they asked me how I solved it. I gave them the answer and they liked it so they hired me.

    The company changed from main frame system to a new CRM system using Oracle. Everyday the mainframe system would generate a whole bunch of text files and loaded into SQL Server tables. The SQL Server tables was used by the web development group. They had the DTS packages to load the text files into SQL Sever tables. Now the company wanted to know how I would load the SQL Server tables using Oracle. The company was implementing the CRM system at the same time. So no one would clearly give the answer to me which table I should use. The company wanted me how I would find out which Oracle tables to use, basically I had to understand the data from the text files and how it matched up with the Oracle tables. I had to create the DTS packages to load the SQL Server tables from Oracle. I had to write up the test plan too so the testers knew how to test the system.

    Basically you give the candidates a real life problem and ask them how they can solve it.

    The second one was I had to build a data warehouse. I would get data from different outside sources. Each one would give me a text delimited file but with different length and data. Would it be possible to build a dynamic system to read different text files and load into the SQL Server tables? I actually did.

  • Loner (7/12/2008)


    The second one was I had to build a data warehouse. I would get data from different outside sources. Each one would give me a text delimited file but with different length and data. Would it be possible to build a dynamic system to read different text files and load into the SQL Server tables? I actually did.

    NOW you're talking! Hey... if you want to write a really cool article, Loner, that would be an outstanding subject!

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

  • I had a .net process called DataAssimilator that did such a function for a prior company. The C# program only imported into a dynamically created or a pre-existing staging table and then had an optional parameter called 'ImportSQL', usually a stored procedure. A DTS/SSIS package could use it too. I never used DTS/SSIS itself to do dyamic staging imports. DataAssimilator was good for SHRM org data imports (no standardized iterim-format; each needed its own assimilation proc) and client bulk-imports (had standardized interim format; all shared one assimilation proc) which often needed multiple-table upserts but little scrubbing.

Viewing 15 posts - 1 through 15 (of 66 total)

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