June 11, 2015 at 3:26 pm
ScottPletcher (6/11/2015)
You can't add Librarian id into the GROUP BY and accurately answer the query, since multiple librarians could have the same surname. You could pre-aggregate, but you must still determine the final total using only the surname, not the lib id.
I think this falls under the category that what the user says they want isn't what they actually want. When calculating a metric like this, it would be highly unusual to combine results for two different librarians who just happen to have the same surname.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 11, 2015 at 3:32 pm
drew.allen (6/11/2015)
ScottPletcher (6/11/2015)
You can't add Librarian id into the GROUP BY and accurately answer the query, since multiple librarians could have the same surname. You could pre-aggregate, but you must still determine the final total using only the surname, not the lib id.I think this falls under the category that what the user says they want isn't what they actually want. When calculating a metric like this, it would be highly unusual to combine results for two different librarians who just happen to have the same surname.
Drew
I thought that might be the point of the exercise/problem. Maybe like a makes-you-think assignment. But once I re-read, I guess you're right.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
Viewing 2 posts - 16 through 16 (of 16 total)
You must be logged in to reply to this topic. Login to reply