Ad
  • Custom User Avatar

    I agree that it's not always good, but it's not always bad either. Just got to make sure it's clear, and you don't need to rewrite or change it later.

  • Default User Avatar

    one line obssesive people >:(

  • Default User Avatar

    It's hard to imagine a situation when one producer (because products should be grouped by a producer) sells different products with exactly the same name :) So DISTINCT is superfluous here I guess.

  • Custom User Avatar

    Done.

  • Default User Avatar

    No, just running the default code, you see the column names.

    It doesn't seem right to me to run the code just to understand the task :)

    Changing that now would render all SQL solutions invalid.

    Indeed, it didn't occur to me. In this case adding a comment about names or correcting examples block (change "time" to "hours" for SQL) would be useful I think. Thank you!

  • Custom User Avatar

    rounded to the smallest value

    That means rounded down, not rounded up like you did.

  • Custom User Avatar

    rounded to the smallest value

    That means rounded down.

  • Custom User Avatar

    No, I think that's Ruby highlighting some reserved words.

  • Custom User Avatar

    In SQL we have to guess column name in the original table.

    No, just running the default code, you see the column names.

    It would be better to keep the original name ("time"), as in Python for example.

    Changing that now would render all SQL solutions invalid.

    So, adding a comment about the column names or adding an specific code block in tha kata description is the best we can do I guess.

  • Default User Avatar

    In SQL we have to guess column name in the original table. In description and examples we see "time", but this name can not be used in query because of

    ERROR: column "time" does not exist.

    Instead of that we have to use "hours" not only for result (as it is said in the description for SQL), but for original column as well. It's confusing. It would be better to keep the original name ("time"), as in Python for example.

  • Default User Avatar

    There is something wrong with the description:

    to hexYou have access to a table of monsters as follows

    should probably be

    You have access to a table of monsters as follows.

    In addition to aesthetic aspects, description like this contains a little spoiler.

  • Default User Avatar

    From PostgreSQL 14 documentation, 7.2.5:
    Currently, window functions always require presorted data, and so the query output will be ordered according to one or another of the window functions' PARTITION BY/ORDER BY clauses. It is not recommended to rely on this, however. Use an explicit top-level ORDER BY clause if you want to be sure the results are sorted in a particular way.
    https://www.postgresql.org/docs/14/queries-table-expressions.html

  • Default User Avatar

    This solution is wrong when the number of the ending weekday is equal or greater than the number of the starting weekday (e.g. period from 2022-01-13 (Thursday, 4) to 2022-01-21 (Friday, 5): this solution gives 5 instead of 7). Now it doesn't pass the tests.

  • Custom User Avatar
  • Custom User Avatar

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

  • Loading more items...