I recently asked my Twitter followers if they had a good example of queries, business questions that SQL can't do. It turns out a better question is "what SQL can't do easily," so I thought I'd share with everyone what I heard and found.

Seth Grimes was the first one to provide an excellent answer with some informative examples -- thank you, Seth! I also found very useful articles on typical SQL challenges such as avoiding multiple, duplicate sets in your SQL results, and why NULLs create tons of headaches for SQL coders.

There's also a typical SQL challenge with ragged, sparse, unbalanced hierarchies and dimensions. For example, a retail store, a wholesalers or a distributor with thousands of products, or a manufacturer with thousands of parts often struggle with dissimilar data. A pencil in an office supply store does not have the same descriptive attributes (lead type, for example) as a calculator (scientific, financial, etc.) or an office chair (number of wheels, etc.). Or, a tire in a car manufacturing supply chain does not have any common descriptive elements (rubber grade, width to height ratio) with gear boxes (automatic vs. manual, 4 or 5 speed, gear to gear ratios, etc.). When looking for correlation between two entities (for example, what is a potential product quality issue that is making my sales go down?), in cases with disparate, dissimilar products (as in retail products or manufacturing parts), the same SQL query cannot not work for all products or parts. One would be forced to write multiple SQL queries for each product or part type to find such a sales/quality relationship.

Register or login for access to this item and much more

All Information Management content is archived after seven days.

Community members receive:
  • All recent and archived articles
  • Conference offers and updates
  • A full menu of enewsletter options
  • Web seminars, white papers, ebooks

Don't have an account? Register for Free Unlimited Access