Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Average churn rates by year for AT&T and Verizon.
# Average Churn Rate by Year for AT&T and Verizon
telecoms=# select year, cast(avg(churn) as decimal(4,2)) as churn from churn_rates where company='AT&T' group by year order by year;
year | churn
------+-------
2018 | 0.90
2019 | 0.95
2020 | 0.79
2021 | 0.76
2022 | 0.77
(5 rows)
telecoms=# select year, cast(avg(churn) as decimal(4,2)) as churn from churn_rates where company='Verizon' group by year order by year;
year | churn
------+-------
2018 | 0.76
2019 | 0.79
2020 | 0.67
2021 | 0.72
2022 | 0.76
# Original Quarterly Data Sourced From Historical Earnings Reports
telecoms=# select * from churn_rates;
quarter | year | churn | company
---------+------+-------+---------
Q2 | 2022 | 0.75 | AT&T
Q1 | 2022 | 0.79 | AT&T
Q4 | 2021 | 0.85 | AT&T
Q3 | 2021 | 0.72 | AT&T
Q2 | 2021 | 0.69 | AT&T
Q1 | 2021 | 0.76 | AT&T
Q4 | 2020 | 0.76 | AT&T
Q3 | 2020 | 0.69 | AT&T
Q2 | 2020 | 0.84 | AT&T
Q1 | 2020 | 0.86 | AT&T
Q4 | 2019 | 1.07 | AT&T
Q3 | 2019 | 0.95 | AT&T
Q2 | 2019 | 0.86 | AT&T
Q1 | 2019 | 0.92 | AT&T
Q4 | 2018 | 1.00 | AT&T
Q3 | 2018 | 0.93 | AT&T
Q2 | 2018 | 0.82 | AT&T
Q1 | 2018 | 0.83 | AT&T
Q2 | 2022 | 0.75 | Verizon
Q1 | 2022 | 0.77 | Verizon
Q4 | 2021 | 0.77 | Verizon
Q3 | 2021 | 0.67 | Verizon
Q2 | 2021 | 0.65 | Verizon
Q1 | 2021 | 0.77 | Verizon
Q4 | 2020 | 0.76 | Verizon
Q3 | 2020 | 0.63 | Verizon
Q2 | 2020 | 0.51 | Verizon
Q1 | 2020 | 0.77 | Verizon
Q4 | 2019 | 0.83 | Verizon
Q3 | 2019 | 0.79 | Verizon
Q2 | 2019 | 0.72 | Verizon
Q1 | 2019 | 0.81 | Verizon
Q4 | 2018 | 0.77 | Verizon
Q3 | 2018 | 0.77 | Verizon
Q2 | 2018 | 0.71 | Verizon
Q1 | 2018 | 0.77 | Verizon
(36 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment