• GilaMonster - Friday, April 21, 2017 3:08 AM

    Neil Burton - Friday, April 21, 2017 2:17 AM

    You're right in what you say Igor but if you look very carefully there's a comma between the PARTITION BY and the ORDER BY in one of the incorrect answers.  As soon as you try to run the incorrect option it throws an error at you.  It nearly caught me out because at an under-caffeinated first glance they both appeared correct.

    I spotted it, because it's a type of syntax error I make quite often. For some reason when writing window functions, I tend to put a comma in the OVER clause if I'm not paying attention.

    Nice to know I'm not the only one that seems to instinctively add a comma for some reason.  🙂