Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 568 Bytes

File metadata and controls

20 lines (13 loc) · 568 Bytes

Definitions

Loyalty: a person is loyal if they interacted (on the same show) in the period prior to the one we're targetting.

Problem

Calculate the loyalty percentage per show: 100% would mean that all fans that commented last period commented again this period, 0% would mean only new fans commented this period. Loyalty measures churn in the commenter base of a show.

Goal

Learn to use Common-Table Expressions (Don't Repeat Yourself), UNION, UNION ALL and INTERSECT.

Tips

Cold-cache case on my machine is 90s, hot-cache is 20s.