Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The specification doesn't say which way the cycles should go. If they were reversed, that would also be a correct solution, yet probably failing the tests.
What @Dmitry-k42 described is actually an issue. Category names are used in the tests not only for tie breaking at the last (5th) places, but also for ordering the otherwise tied rows in the result. See my solution. The description (updated after @Volie's issue) requires the
"name"
in the innerORDER BY
clause, but not the outer. Yet, the order of such rows is arbitrary without it, which may fail your tests.The description of kata is ambiguous - it says: "return a list of users and their pet names, but only for users who have at least one pet whose name starts with the letter 'M'." It doesn't say that we should exclude all pet names which doesn't start with 'M'. According to description we should return all users and all their pet names in case if at least one pet name starts with 'M' for a giver user.
This comment is hidden because it contains spoiler information about the solution
In the random tests, it is possible for two persosn to be tied by number of rentals AND by last name. The bug can be easily replicated by adding
random()
as a third sorting criterion (which normally should not change the results if the first two criteria were enough).the link to the DVD rental database in the description is dead.
postgresqltutorial.com
now redirects toneon.tech
which is a commercial website, though you can still download the DB for free from therethe link to the DVD rental database in the description is dead.
postgresqltutorial.com
now redirects toneon.tech
which is a commercial website, though you can still download the DB for free from thereThe instructions say that 'call_hour' should be an int but the tests fail as they want the 'call_hour' to be a float.
I can't complete as I'm getting this error: ./spec/query_spec.rb:169:in
block in format_output': undefined method
ljust' for nil:NilClass (NoMethodError)Any idea what is going on?
Expected values
2nd level sorting order is to be the rental date, so I think this should better be sorted be the actual dates, not the strings, otherwise Nov 11th will be shown as "later" than Dec 12th.
My solution is passing without accounting for leap years, and I think that is ok for a beginner level kata.
If so, maybe you could change this date for the last sample test entry to 367?
--> host_software.insert(host: 'backup_server_1', software_title: 'Title1', install_date: Date.today - 366)
You could add to the description that "percentage of orders" only refers to the count of processed orders here, not to the combined total orders.
Trying to make sense of what is expected in terms of sorting. This is what is expected (only showing two dates here):
I believe "returns no products if no tags are provided" should be stated in description as well. For me it is not a default behaviour (maybe it is a professional deformation, though)
While the emphasis is on the uniqueness of the features rather than their order, the final tests require that the features maintain their original order. It might be helpful to clarify: "Although order is not a factor when determining uniqueness, the final output should present the arrays in their original order."
Loading more items...