6 kyu

Analyzing the sales by product and date

2,135 of 2,134FArekkusu
Description
Loading description...
Algorithms
  • Please sign in or sign up to leave a comment.
  • DrXenocide Avatar

    I'm stuck at the monthly/yearly totals. I can get the daily totals, but dont know how to insert the others.

  • Doc-Duck Avatar

    This comment has been hidden.

  • aureliolucassilva Avatar

    An error occurred while loading ./main.rb. Failure/Error: prepare_sample_data

    NameError: undefined local variable or method `prepare_sample_data' for main:Object

    ./spec.rb:1:in `<top (required)>'

    ./main.rb:32:in `<top (required)>'

    No examples found.

    What is this error?

  • Nesthor Avatar

    I check the solutions, copy the best sol, go back and paste it, run it. ERROR!! This kata has obviously smth wrong

  • docgunthrop Avatar

    The tests are expecting totals in scientific notation, but the sample tests do not. So which one should it be? And the test is somehow timing out...

  • matheusguifer Avatar

    This comment has been hidden.

  • micahwiesner67 Avatar

    This comment has been hidden.

  • KamilSzewczyk77 Avatar

    This comment has been hidden.

  • SeptemFolia Avatar

    Nice kata. Unfortunately, my solution runs in the console error "Max Buffer Size Reached (1.5 MiB)". The test is all green. But the "Attempt" fails with this error. I think there are too many rows returned and printed.

  • thomaspivaf Avatar

    this one was disgusting

  • Pierre-Husted-Sigvardsen Avatar

    The test-data seems to be have gone missing.

  • JanKulbinski Avatar

    I went for a solution with unions and couldn't manage to pass 3 tests:

    "year" column should be a Fixnum value

    "month" column should be a Fixnum value

    "day" column should be a Fixnum value

    Can anyone please help ?

  • oleksiiB Avatar

    This kata deserves higher ranking

  • OleksiyD Avatar

    This comment has been hidden.

  • elupovit Avatar

    Has anyone found missing data issues when running their query?

    I've got 10/12 steps correct and was able to get the total revenue broken down by year, month, and day.

    The two errors I'm running into are

    1. Rows expected: 5313 got: 4999

    2. Actual and expected tables don't match perfectly (even when it appears they do)

    Appreciate any guidance I can get.

    Thanks!

  • niffy1993 Avatar

    This comment has been hidden.

  • vlad-gavrilov Avatar

    This comment has been hidden.

  • Sir Montes Avatar

    This comment has been hidden.

  • dwai03 Avatar

    This comment has been hidden.

  • kartoffelz Avatar

    This comment has been hidden.

  • jjordanbaird Avatar

    Great Kata, you might consider switching the "profit" wording to "revenue" though. Profit implies a subtraction of cost

  • Voile Avatar

    In both sample tests and actual tests:

     should have 25 rows
    Test Failed
    expected: 25
         got: 24
    
    (compared using ==)
     should return the expected results
    Test Failed
    @@ ,product_name,year,month,day ,total
    ...,...         ,... ,...  ,... ,...
       ,milk        ,NULL,NULL ,NULL,21.0
    +++,        ,, ,,
    

    Another row with all values empty is expected.

  • Voile Avatar

    → ,sausages ,2018,NULL ,NULL,66712.7999999999→66712.8

    There are floating point errors in the actual tests. Shouldn't price be of type decimal anyway since it's currency data?