I have data like:
YEAR_MONTH|AVG_VISITS|WAS_MEMBER
2020-09|10|True
2020-09|5|False
2019-04|2.5|True
2019-04|5|False
I'd like to make it into a table that calculates the percentage of visits membership added:
YEAR_MONTH|VISIT_PERCENT
2020-09|200
2019-04|50
What is the SQL that would let me look between rows for this sort of calculation?