Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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 inner ORDER BY clause, but not the outer. Yet, the order of such rows is arbitrary without it, which may fail your tests.

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    list should be sorted by the quantity of rentals from higher to lower and if number of rentals is the same - then by last name of a customer

    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).

  • Custom User Avatar

    the link to the DVD rental database in the description is dead. postgresqltutorial.com now redirects to neon.tech which is a commercial website, though you can still download the DB for free from there

  • Custom User Avatar

    the link to the DVD rental database in the description is dead. postgresqltutorial.com now redirects to neon.tech which is a commercial website, though you can still download the DB for free from there

  • Custom User Avatar

    The instructions say that 'call_hour' should be an int but the tests fail as they want the 'call_hour' to be a float.

  • Custom User Avatar

    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?

  • Custom User Avatar

    Expected values

    film_id	film_title	                            rental_count	    last_rental_date
    459	    Indiana Jones and the Last Crusade (R)    13	              December 12, 2024
    188	    Cinema Paradiso (G)	                   13	              December 01, 2024
    304	    The Shining (R)	                       13	              December 01, 2024
    295	    All About Eve (PG)	                    12	              November 11, 2024
    171	    The Kid (PG)	                          12	              December 12, 2024
    300	    The Great Dictator (PG)	               12	              December 09, 2024
    145	    The Help (PG-13)	                      12	              December 04, 2024
    

    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.

  • Custom User Avatar

    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)

  • Custom User Avatar

    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.

  • Custom User Avatar

    Trying to make sense of what is expected in terms of sorting. This is what is expected (only showing two dates here):

    Results: Expected
    
    product_id	sale_qty	return_qty	date
    p1	        66	      9	         2023-08-19
    p1	        66	      6	         2023-08-19
    p1	        26	      9	         2023-08-19
    p1	        26	      6	         2023-08-19
    --> So for August 19th sorting should be descending for sales and descending for returns
    
    p1	        41	      5	         2023-08-31
    p1	        41	      22	        2023-08-31
    p1	        39	      5	         2023-08-31
    p1	        39	      22	        2023-08-31
    --> But for August 31st sorting is expected to be descending for sales and ascending for returns
    
  • Custom User Avatar

    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)

  • Custom User Avatar

    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...