SELECT Yourself

Today’s question is very simple.

If you were any type of T-SQL query, what type would you be?

Personally, I see myself as the type of query that looks normal enough, but causes all sorts of problems once you let it loose in production, but you don’t want to kill it because you are afraid to wait for the rollback.

10 thoughts on “SELECT Yourself”

  1. This would be a better “stupid interview question” than the normal “stupid interview questions” (“what kind of vegetable or animal would you be? “)

    As for a SQL Query that I would be… I have a lot of interests that while different, have some common themes between them. There are some overarching principles I try to live by.

    So I would probably have a CTE of my common principals, values, etc. and then find the commonality between the interests and do a few unioned selects.

    Reply
  2. I’m some sort of stored procedure that would calculate some statistical information to be used for some sort of detailed analysis report for someone. Sort of like baseball data. What is the batting average of left-handed hitters against left-handed pitchers after 9 p.m. when the humidity is <= 58% and the wind is < 9 m.p.h.

    sp_ReferenceLibrarian

    Reply
  3. SELECT D.Lname + ‘, ‘ + D.Fname
    FROM DBPros D
    INNER JOIN People_Statuses PS ON D.dbp_id = PS.dbp_id
    INNER JOIN Statuses S ON PS.status_id = S.status_id
    INNER JOIN People_Personalities PP ON D.dbp_id = PP.dbp_id
    INNER JOIN Personalities P ON PP.pers_id = P.pers_id
    INNER JOIN People_Skillset PS ON D.dbp_id = PS.dbp_id
    INNER JOIN SkillSet SS ON PS.skillset_id = SS.skillset_id
    INNER JOIN People_ExtracurricularActivities PEA ON D.dbp_id = PEA.dbp_id
    INNER JOIN ExtracurricularActivities EA ON PEA.ea_id = EA.ea_id
    WHERE
    S.status_desc IN (‘chillaxed’, ‘stressed’) –Yes, can be both aka “tech bi-polarism”
    AND P.personality_desc = ‘confident’
    AND SS.skillset_desc IN (‘DBA_General’, ‘SSIS’, ‘Internals’, ‘DMV’, ‘Development’, ‘TSQL’, ‘VB’, ‘Agent’)
    AND EA.ea_desc IN (‘Skiing’, ‘Gaming’, ‘Reading’, ‘Photography’, ‘Volunteerism’, ‘Coffee Snobery’, ‘Zymurgy’, ‘Cooking’, ‘Technogeekery’, ‘Gardening’, ‘Parenting’, ‘Fitness’)

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.