Ad
  • Custom User Avatar

    One of the best SQL katas I've seen. Taught me more about P-SQL and how it differs from T-SQL than any other I've attempted.

  • Default User Avatar

    Clever kata, but there's a problem with what constitutes a "customer". See my solution.

    -- The full test suite only counts customers with at least one rental.
    -- This is wrong. About 10 customers have no rentals, but they are still customers.
    -- That affects the Top 20% calculations and causes correct solutions to fail final testing.
    -- The code below illustrates the problem. Change "INNER JOIN" to "LEFT JOIN" in first CTE to
    -- see what I think should be the correct solution.

  • Default User Avatar

    Clever idea but doesn't work. "nnwnnwnsns" is deemed a valid walk but would leave you 6 blocks away. Change E to 200 and W to -200.