A
Adam Turner via AccessMonster.com
I was interviewed for a job today and they asked a question that baffled me.
If you were given a list of 100 names, how would you seperate them into 10
distinct groups?
I asked, "Grouped by what?"
His response, "Just ten groups"
My response, "I would run 10 queries"
His response, "What would the result set look like?"
My response, "10 distinct groups"
His response, "10 distinct groups of what?"
My response, NO KIDDING, "That was my original question"
I asked him to be more specific, but that was a hopeless endeavor.
My best guess is he was looking for the following but a question will follow:
Select TOP 100 Name, Name, Name, Name, Name, Name, Name, Name, Name, Name
From MyTable
Group BY Name, Name, Name, Name, Name, Name, Name, Name, Name, Name
....but how do you get the first set of 10, the second set of 10...etc?
Is this a function of FETCH STATUS CURSOR documentation I'm not aware of?
He didn't give me the answer, and I'm dying to know if there is one.
Thanks to all that reply,
Adam Turner
If you were given a list of 100 names, how would you seperate them into 10
distinct groups?
I asked, "Grouped by what?"
His response, "Just ten groups"
My response, "I would run 10 queries"
His response, "What would the result set look like?"
My response, "10 distinct groups"
His response, "10 distinct groups of what?"
My response, NO KIDDING, "That was my original question"
I asked him to be more specific, but that was a hopeless endeavor.
My best guess is he was looking for the following but a question will follow:
Select TOP 100 Name, Name, Name, Name, Name, Name, Name, Name, Name, Name
From MyTable
Group BY Name, Name, Name, Name, Name, Name, Name, Name, Name, Name
....but how do you get the first set of 10, the second set of 10...etc?
Is this a function of FETCH STATUS CURSOR documentation I'm not aware of?
He didn't give me the answer, and I'm dying to know if there is one.
Thanks to all that reply,
Adam Turner