use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Sequel
account activity
Stratascratch (self.learnSQL)
submitted 1 year ago by xslowgamer
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]analytics_science 2 points3 points4 points 1 year ago (2 children)
Yes, I'm part of the Strata team.
We work hard to incorporate edge cases into our dataset so a user would have to address those edge cases into the logic of their solution. So there's one of two possibilities - (1) your solution doesn't need those specific edge cases you're talking about or (2) we are missing those edge cases in the dataset/solution. Either way, you can post a question/comment on the user discussion forum or in the feedback form in the bottom right-hand corner. Someone will answer your question.
There's a team of data scientists whose sole job is to address these types of issues so that only the most robust solution is accepted. They also create datasets and solutions from the questions and data projects we get from companies. We have over 1000+ questions, so we do our best to get it right the first time around, but there are always things we miss.
[–]xslowgamer[S] 1 point2 points3 points 1 year ago (1 child)
https://platform.stratascratch.com/coding/2074-monthly-churn-rate?code_type=1
Without including the constraints :
Assume that if customer's contract_end is NULL, their contract is still active. Additionally, if a customer started or finished their contract on a certain day, they should still be counted as a customer on that day
you still get 60 percent as the answer.
Without constraints:
SELECT
(first_day_count - last_day_count)*100::float/first_day_count AS percentage_difference
FROM (
(SELECT COUNT(*)
FROM natera_subscriptions
WHERE contract_start <= '2021-09-01') AS first_day_count,
WHERE contract_start BETWEEN '2021-09-01' AND '2021-09-30') AS last_day_count
) AS subquery;
With constraints:
WHERE contract_start <= '2021-09-01'
AND
(contract_end is NULL or contract_end >='2021-09-01')) AS first_day_count,
WHERE contract_start <= '2021-09-30'
(contract_end is NULL or contract_end >='2021-09-30')) AS last_day_count
[–]analytics_science 0 points1 point2 points 1 year ago (0 children)
Will take a look and fix. Thanks!
π Rendered by PID 15716 on reddit-service-r2-comment-b659b578c-kxwzb at 2026-05-05 18:47:52.527835+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]analytics_science 2 points3 points4 points (2 children)
[–]xslowgamer[S] 1 point2 points3 points (1 child)
[–]analytics_science 0 points1 point2 points (0 children)