FAQ: Why Learn SQL? - Analyzing User Churn

This community-built FAQ covers the “Analyzing User Churn” exercise from the lesson “Why Learn SQL?”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Analyze Data with SQL

FAQs on the exercise Analyzing User Churn

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

For lesson 4, Analyzing User Churn.

  1. When getting “churn_rate”, why can’t we simplified the syntax by using the existing strings that we just named early like below? Instead of typing out the whole thing?

    ROUND(100.0 * ‘march_cancellations’ / ‘enrollments’) AS churn_rate

  2. Some lessons say we should use ’ after AS to tag the names. but the example didn’t. Should we use ’ or not?

1 Like

How do we learn how to answer this question? What recommendations would you make to Codecademy based on Catherine’s analysis? The churn rate was 25% but I do not know what recommendation to make to help codecademy from the analysis.


I went ahead and tried it your way, simplifying the syntax by creating a ‘march_cancellations’ and referencing it. Worked out just fine and I think the point of the exercise (and your ability to change it) is maybe just to empower the user to explore and do things their way.

For instance, I also went and thought to change the last line about cancellations AFTER March 1 (cancel_date > ‘2017-03-01’) to be after or equal to (>=) to include people cancelling on March 1. Kind of fun to see a few extra numbers updated, and goes to the interactivity of the whole exercise.

You should use ’ if you want!

1 Like

Great reply! To the point :slight_smile:

It will help in making a business decision as well as tracking the performance and reliability of their product.