Practice identifying results from dml queries

  • hi

    I am studying for 70-762 exam and am looking to practice Identifying results of some really good, complex practice queries.   Any good sites for this (besides the official practice exams)?

    thank you kindly,

    J

  • dbgaragedays wrote:

    hi

    I am studying for 70-762 exam and am looking to practice Identifying results of some really good, complex practice queries.   Any good sites for this (besides the official practice exams)?

    thank you kindly,

    J

    What do you mean by "identifying results", exactly? Do you mean being able to describe what the query is doing, or something else?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • You could download adventureworks database and just write some complex queries against that?

    But it depends on what you consider complex.  I have some stored procedures at my workplace that are over 6000 lines long.  Mind you, it is a lot of short and easy queries.  Some of the ones on this forum are fun examples though of complex queries.

    But complex to some may be simple to others.  XML parsing is a common one that is difficult to do for most, but for some people, XML parsing is trivial.

    The QOTD's are also a good place to look at.  And there are always the few trick questions like:

    DECLARE @tmp TABLE
    (
    [ID] INT
    , [value] VARCHAR(25)
    );
    INSERT INTO @tmp
    VALUES
    (
    1
    , 'hello'
    )
    , (
    2
    , NULL
    )
    , (
    3
    , 'world'
    );

    SELECT
    [ID]
    , [value]
    FROM@tmp
    WHERE[value] NOT IN (
    NULL
    );

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • XML parsing is a common one that is difficult to do for most, but for some people, XML parsing is trivial.

    Trivial? Yikes.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Phil Parkin wrote:

    XML parsing is a common one that is difficult to do for most, but for some people, XML parsing is trivial.

    Trivial? Yikes.

    LOL... for me it definitely is not, but I know there are some people on the forum who find XML parsing to be not that bad.  I personally don't know anyone like that. I'd likely bring the XML parsing over to C# rather than in SQL and then it is pretty easy to manage.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Identifying results meaning...

    Given a sample database schema and DML query provided, I have to come up with the results of the sample query.

    This is a section of the exam and so I wanted to practice.  I guess I could make my own up based on adventureworks, but I thought maybe there were already some good ones out there somewhere that someone has seen.

  • dbgaragedays wrote:

    Identifying results meaning...

    Given a sample database schema and DML query provided, I have to come up with the results of the sample query.

    This is a section of the exam and so I wanted to practice.  I guess I could make my own up based on adventureworks, but I thought maybe there were already some good ones out there somewhere that someone has seen.

    More cryptic clues! What do you mean "Come up with"?

    Isn't that as simple as hitting F5 to execute the query? I must be missing something.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Phil Parkin wrote:

    dbgaragedays wrote:

    Identifying results meaning...

    Given a sample database schema and DML query provided, I have to come up with the results of the sample query.

    This is a section of the exam and so I wanted to practice.  I guess I could make my own up based on adventureworks, but I thought maybe there were already some good ones out there somewhere that someone has seen.

    More cryptic clues! What do you mean "Come up with"?

    Isn't that as simple as hitting F5 to execute the query? I must be missing something.

    I don't know if I'm interpreting what the OP might be asking for correctly or not but I think he's asking for example problems that also provide the answers in the proverbial "back of the book".  It's a very effective way of studying.  Try first, look at the answer to see what you were doing wrong and why it was wrong and then, try again.

    --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 8 posts - 1 through 7 (of 7 total)

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