October 14, 2015 at 9:51 pm
Comments posted to this topic are about the item Cross Apply
...
October 15, 2015 at 1:30 am
I don't think any of the answers are correct because the question refers to Products, and there is no mention of products in the query, only sales order values. Without knowing what was ordered, the query cannot return anything related to product.
Another badly worded question, I'm afraid.
October 15, 2015 at 1:39 am
I also didn't think any of the answers were correct as the order by was by CustomerId then TotalDue desc
October 15, 2015 at 2:15 am
Nice but somewhat confusing question.
SalesOrderID <> Product.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 15, 2015 at 2:15 am
BillLudlow (10/15/2015)
I also didn't think any of the answers were correct as the order by was by CustomerId then TotalDue desc
Yes, but since CustomerID is filtered upon there is only one value, so it doesn't matter.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 15, 2015 at 2:18 am
The correct answer is that an error occurs, as neither of those tables exists 😉
October 15, 2015 at 2:20 am
Toreador (10/15/2015)
The correct answer is that an error occurs, as neither of those tables exists 😉
The more correct answer would then be: "It depends". 😛
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 15, 2015 at 2:24 am
None of the columns returned by the query would represent a product.
October 15, 2015 at 5:19 am
I think the intent of what the question is trying to teach is good, but the answers are worded strangely. None of them accurately define the result set, so I just picked the closest one I couldn't say is flat-out wrong.
October 15, 2015 at 5:32 am
OK OK, I think I got it, it was my first question and it was badly worded, many apologies for that.
I made the mistake of changing the SQL statement to look less complex in order to demo what can be done with TOP, Only sorry I forgot to amend the possible answers accordingly :blush:
Thanks Ed, the intent was to show how a correlated query can be helpful in such a situation. I could also have given the name of the version of AdventureWorks I used to check the output.
🙁
...
October 15, 2015 at 5:35 am
Nice but Imho answer should be "The TOP 3 highest orders for all customers who have made a purchase."
Regards
Mike
October 15, 2015 at 5:40 am
happygeek (10/15/2015)
OK OK, I think I got it, it was my first question and it was badly worded, many apologies for that.I made the mistake of changing the SQL statement to look less complex in order to demo what can be done with TOP, Only sorry I forgot to amend the possible answers accordingly :blush:
Thanks Ed, the intent was to show how a correlated query can be helpful in such a situation. I could also have given the name of the version of AdventureWorks I used to check the output.
🙁
I think most people would recognize it as being for AdventureWorks, but I would hope that it isn't necessary. I hope the QOTD is to learn something, so looking at the query and thinking it through is better that simply copy/paste/run then click/click to get the right answer.
Like I said, I think your intent was good. I've submitted exactly zero QOTDs myself, but I think unarguable to say that with any question, different people are going to real the same question differently. You won't make everyone happy all the time.
October 15, 2015 at 7:02 am
The supposedly correct answer "The TOP 3 selling products for all customers who have made a purchase." is ambiguous. As I read it, I would expect only three rows in the result set. While that is possible, it is not likely. I think the author meant:
The TOP 3 selling products for each customer who have made a purchase.
Gerald Britton, Pluralsight courses
October 15, 2015 at 7:15 am
happygeek (10/15/2015)
OK OK, I think I got it, it was my first question and it was badly worded, many apologies for that.I made the mistake of changing the SQL statement to look less complex in order to demo what can be done with TOP, Only sorry I forgot to amend the possible answers accordingly :blush:
Thanks Ed, the intent was to show how a correlated query can be helpful in such a situation. I could also have given the name of the version of AdventureWorks I used to check the output.
🙁
Congrats on your first QotD! The intent of this question was very good, so I hope this doesn't stop you from creating more questions.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 15, 2015 at 7:16 am
The query does not return product information therefore all answers are WRONG! Salesorderid does not equal product!
Really need to stop posting questions where the wording is incorrect!!
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
Viewing 15 posts - 1 through 15 (of 33 total)
You must be logged in to reply to this topic. Login to reply