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.
Email script differ between description and tests:
"(...)Unfortunately, you have selected a bad(...)"
(description)vs.
"(...)Unfortunately you have selected a bad(...)"
(test).It probably should, but I believe that was not the point of your original remark.
I'm not aware of any errors. Correct solution passes tests just fine.
Which test did fail for you with that 'expected result'?
The default test - the only with the above dataset - doesn't include result validation.
Sets the name (alias) of result column.
Your interpretation of exit_time description and start=exit is correct.
Wording of exit_time definition was specifically chosen to express interval
openess and covers points 2 and 3 and, by extension, point 1.
I don't believe further extension of specification is needed.
Your solution seems to incorrectly handle case described in p. 2.
Overlaps are the whole point of this kata. Check your query against a dataset with multiple events starting at the same time.
Thanks for the info!
The solution by alimanavi, gcapo, and others is indeed wrong.
It returns the right answer only when database (by chance) returns rows in expected
orded for second column omitted from order by clause.
Unfortunatelly there's not much that can be done beside unlisting the whole kata.
Test cases are locked from editing so I can't try to find a more consistently failing
case to add.
Closing as non-issue
Which test cases fail for you?
Imagine having just two visits:
ENTRY 2019-04-01 00:00:00 || EXIT 2019-04-10 00:00:00
ENTRY 2019-04-03 00:00:00 || EXIT 2019-04-13 00:00:00
For these two, we have the following events:
before 2019-04-01 there were no visitors,
at 2019-04-01 00:00:00 first one arrived, we now have one visit in progress,
at 2019-04-03 00:00:00 second one arrived, we now have two visits in progress,
at 2019-04-10 00:00:00 the first one is gone, so we are down to only one visitor,
finally, at 2019-04-13 00:00:00 no one is left.
The maximum number of simultaneous visitors is: ?
There were that many visitors visiting between: ? and: ?
The earliest time when there were ? concurrent visitors is at the start of that timespan.
Nope, the specs says "earliest timestamp when there were visits_count concurrent visits" so it's the other way around.
Hi! Try checking your solution againsta a dataset with multiple visits starting, ending or one starting and another ending at the exact same timestamp.
Hi! Try running your query against a dataset with multiple events starting on the same timestamp.
For these two, we have the following events:
The maximum number of simultaneous visitors is: ?
There were that many visitors visiting between: ? and: ?
The earliest time when there were ? concurrent visitors is at the start of that timespan.
Loading more items...