Try Tuts+ Premium, Get Cash Back!
Nettuts+ Quiz #11: Do You Know SQL?

Nettuts+ Quiz #11: Do You Know SQL?

This entry is part 11 of 12 in the The Official Nettuts+ Quizzes Session
« PreviousNext »

In 2012, we plan to take our quizzes to a whole new level with ones aimed at all languages and catering to all competencies and tastes. This month, we’re covering a little SQL.

With more frameworks being bundled with an ORM, SQL is quickly becoming a lost art and is mostly relegated to the nerdiest of our clan — those pesky database people. Why not take today’s quiz and see whether you DB-chops have really gone the way of the dodo?



Siddharth is Siddharth on Codecanyon
Tags: quizsql
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.blainesch.com BlaineSch

    These quizzes are so fun!

    • Selcuk

      Yeah I agree. More quizzes please!

    • http://zagalski.pl zagal

      Indeed! They rly are :P

  • Yamcsha

    Hi, thanks for the nice quiz
    scored 85.71%

    • http://net.tutsplus.com/articles/nettuts-quiz-11-do-you-know-sql/ Nuril

      hahaha nice score… same here :D

  • https://twitter.com/#!/gavrisimo Gavrisimo

    Nice quiz! :)

    On one question you have two same answers, I think it was the one with “DML, DOL, etc”, can’t remember now… =D

  • http://jacobbednarz.com Jacob Bednarz

    Nice quiz! Just to let you know you have doubled up the answers in question 6 (“Which of these is not a subset of SQL?”)

    • http://www.facebook.com/vbiancaholic vbianx

      What does the UNION statement do?
      –Mediate the worker clauses so they don’t go on strike

      LOL :))

  • http://daniel-lucas.com Daniel Lucas

    Yoopee, 85.71%

  • Akiii

    Quizzes are fun !

    Thanks and Regards
    Akiii

  • http://wpden.net/ Ritesh Sanap

    Nice Quiz, great fun, will be waiting for more quiz’es

  • http://mo7amedkhairy.com moahmed

    85.71%
    thanks for quiz

  • John

    Wow, countless hours of doing relational algebra have paid off. Perfect score, this is my moment of glory. :D PS: Sarcasm was here.

  • http://www.michaelchromik.com mchchrmk

    Questions #9: The WHERE clause can not be used in conjunction with aggregate functions. Is this statement true or false?

    I dont get it. This statement is wrong or not?

    • j

      The Aggregate + WHERE clause question is either wrong or too vague to answer.

      • http://www.smart-webz.ie Alchmication

        WHERE works with one record – how would you like to use COUNT with one row? Count/Avg/Max work with a SET of records… Don’t thank me, thank my Database teacher Mr. Treacy ;) And good luck with SQL…

    • http://www.thirdwave.org Rrrroy

      select pub_id, total = sum(total_sales)
      from titles
      where total_sales is not null

      seems fine to me….

      • Mauricio

        The aggregate functions cannot be used with where clause like this:

        “[...] WHERE SUM(`column`) > 7000 [...]“;

        For this, you have the HAVING statement.

        Hope this clears out..

  • luglio7

    78.57, grr

  • http://namthanh.vn ve may bay

    Hi, thanks for the nice quiz

  • ThePoster

    Question 9 is only partially true. I assume the auther is referring to HAVING but it works with WHERE depending on the case

    SELECT COUNT(*) FROM table WHERE id=4;

    is valid and will execute (though not usefull, but that is note the case) with both MySQL and PostgreSQL (I assume Oracle und MS SQL will execute it as well).

    • http://www.michaelchromik.com mchchrmk

      Okay, i agree. It depends on the case.
      - Restrictions on the result of aggregations require a HAVING clause.
      - Restrictions on the basis of aggregations require a WHERE clause.

    • http://tommybrunn.com Tommy Brunn

      This threw me off as well.

      Oh well, I only got one other question wrong. I’m happy with that.

    • Abhijit

      You are right. The statement – SELECT SUM(salary) FROM employee WHERE salary < 5000 – is correct. We can use WHERE clause with aggregate functions.

      • http://cv.zerkms.com zerkms

        Nope. It was obviously meant that you cannot use

        WHERE foo = SUM(bar)

      • Bill Froelich

        It was not obvious at all that the question was referring to WHERE field = sum(bar). The wording on the question should be clarified as I took it to mean like the example Abhijit gave. Hence I got it wrong ;-)

  • http://andywalpole.me/ Andy Walpole

    64.29

    I want more!

  • # skoolkaholic

    85,71 %

    i’ve got wrong at #5 & #9 (true/false) haha

  • coredump

    Nice quiz! scored 85.7 % :)

  • aslasklajlsal

    78.57%

  • Alaa Al-Neaimey

    nice quiz

    • Alaa Al-Neaimey

      I got 92.86

  • http://www.morequizz.com More

    MORE MORE? MORE PLZ !

  • Luchian Isaacs

    Just drank a whole bottle of vodka (750ml) clean in 30 minutes… took this test drunk… 78.57%

    Why I didn’t get 100%
    14. Never seen DML in my life
    13. Didn’t know what was going on there
    9. Didn’t know Where couldn’t be used with aggregate commands

    Who cares, 78.57% and I’m about to pass out… FTW

    Peace People!!!!

  • http://cv.zerkms.com zerkms
  • http://georgedina.ro George Dina

    85.71%
    I’ve nailed it with SQL subsets.

  • http://www.tuhinanshu.com Terence

    100%. Yep, still got it.
    Pay attention in class, people.

  • bumcom

    you 78.57%

  • kankaro

    78.57% it seems there are some term in database that i don’t know :D hehehe thanks for the great quiz sidhart :D

  • Furqan

    Perfect !
    Scored 85.71%

  • harish kurup

    Good! i never thought of getting 64.29%.. nice quiz!

  • tushar

    i got 100% thanks

  • Shawqi

    I am wondering whether SQL good tutorial series is there or not ?

  • http://blue-fx.org zanzzy

    Almost there! With a little more work, you will have this man’s swagger! You scored 78.57%

    Not bad for a FE Developer :)

  • Mark

    92.86%. Got one wrong. Isn’t SQL in imperative voice? Like it wants you to SELECT something from the table, UPDATE a record, DELETE one, DECLARE a variable. lol

  • Waqas

    Scored 100%

  • Daniele

    Scored 85.71%
    I did wrong on #6 (-.-) and on question #9 BUT:
    SELECT MAX(Price) FROM Products WHERE Category = 10 [GROUP BY Price]
    Is a valid aggregation function with a WHERE statment.

    Correct me if I’m wrong…
    I passed it anyway :D

  • arpadcseh

    78.57 :D

  • http://twitter.com/vladimir_light vLight

    First try, 100%. Was unsure about 13th question

  • Ricardo Guillen

    85.71% . . .

  • http://www.totalbounty.com Jules M

    Cool quick! I think I need to learn more about SQL with the result I got. Hmm.

  • http://www.totalbounty.com Jules M

    Cool quiz! I think I need to learn more about SQL with the result I got. Hmm.

    Sorry I can’t make an edit on the previous post ;)

  • http://myemploi-algerie.com/ algerie

    Nice!
    Scored 85.71%.

  • Ashley Clarke

    This is the first quiz I have gotten 100% on, although I did guess on 1 question (Q8, didn’t know if the answer was DOL or DCL)

    Nice quiz :D

  • Eric

    Oh yea…100%

  • Garrafa

    oh look.. my first 100% xD

  • Jesus

    i am gonna be honest may score was 42,54% T.T most of them cuz i did’nt read well the quuestions :b

  • Robert

    Got an 85.71% and I don’t know anything about SQL! Most of the answers can be deduced by reading the question and available choices!

  • http://www.justinscarpetti.com Justin Scarpetti

    I thought I would do better than that! – 78.57%
    This reminded me of school tests, ew

  • Binoy

    Hi,

    Nice one… But I like the program.. Nice interface.. How did you do that ? Any sample code ?

    Regards
    Binoy

  • Binoy
  • FlipperK

    Scored 100%. But to be honest I didn’t know 3 of them, just picked the right ones on question 6 (subset of SQL), 12 (ANSI) and 14 (DML). All the other questions I knew for sure :-)

  • http://perso.amarok2.net/ Amarok2

    64.29%
    hmmm, i think i need some tutorial ! :-)
    please

  • Shani0610

    100%…

    Made a guess at 13 coz never heard of it. ;-)