Skip to content

Instantly share code, notes, and snippets.

@wesleymann
wesleymann / star_seller_transition_analysis.html
Last active April 9, 2026 18:17
Star Seller Transition Analysis — Diff-in-Diff impact of Star Seller badge on seller GMS and buyer growth
<!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>star_seller_transition_analysis</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<style type="text/css">
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
@wesleymann
wesleymann / mvs_cohort_performance_report.html
Created April 8, 2026 19:27
Marketplace Makers vs Other Seller Cohorts: Performance Analysis (April 4-7, 2026)
<!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>mvs_cohort_performance_report</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<style type="text/css">
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
diff --git a/auto/production/daily/cart_metrics.sql b/auto/production/daily/cart_metrics.sql
new file mode 100644
index 00000000..779923f1
--- /dev/null
+++ b/auto/production/daily/cart_metrics.sql
@@ -0,0 +1,339 @@
+--Cart Mart
+--Description: This rollups is seeking to be a one stop shop for cart related metrics
+--Owner: wmann@etsy.com
+--Team: Finance Analytics
diff --git a/manual/adhoc/Take_Rate_Ingestion.txt b/manual/adhoc/Take_Rate_Ingestion.txt
new file mode 100644
index 00000000..b86bc4aa
--- /dev/null
+++ b/manual/adhoc/Take_Rate_Ingestion.txt
@@ -0,0 +1,4 @@
+Take_Rate_Ingestion.txt
+--Use this to run the take rate ingestion
+
+cd /home/wmann/development/bizdata/gsheets/ && . /home/wmann/development/bizdata/gsheets/.env/bin/activate && /home/wmann/development/bizdata/gsheets/.env/bin/python3 /home/wmann/development/AnalystWork/wmann/daily_revenue_work/take_rate_to_vertica.py >> /home/wmann/development/AnalystWork/wmann/daily_revenue_work/take_rate_output.txt && cat /home/wmann/development/AnalystWork/wmann/daily_revenue_work/take_rate_output.txt && cd &&deactivate
diff --git a/auto/production/daily/etsy_payments_detail.sql b/auto/production/daily/etsy_payments_detail.sql
index f87cb0b..e830215 100644
--- a/auto/production/daily/etsy_payments_detail.sql
+++ b/auto/production/daily/etsy_payments_detail.sql
@@ -458,8 +458,8 @@ create local temp table if not exists payments_adjustments_pre_fx_ep on commit p
p.shop_payment_id,
a.payment_adjustment_id,
a.status,
- c.number_precision as ledger_currency_precision,
- d.number_precision as buyer_currency_precision,
diff --git a/manual/adhoc/take_rate_to_vertica.py b/manual/adhoc/take_rate_to_vertica.py
index 1e5508b0..7dac461d 100644
--- a/manual/adhoc/take_rate_to_vertica.py
+++ b/manual/adhoc/take_rate_to_vertica.py
@@ -17,7 +17,7 @@ spreadsheet_range = "A:D"
create_temp=''' create table if not exists static.take_rate_temp (
month date,
revenue_stream varchar(80) default null,
- take_rate decimal(10,2),
+ take_rate decimal(10,4),
diff --git a/manual/adhoc/take_rate_to_vertica.py b/manual/adhoc/take_rate_to_vertica.py
index 1e5508b0..7dac461d 100644
--- a/manual/adhoc/take_rate_to_vertica.py
+++ b/manual/adhoc/take_rate_to_vertica.py
@@ -17,7 +17,7 @@ spreadsheet_range = "A:D"
create_temp=''' create table if not exists static.take_rate_temp (
month date,
revenue_stream varchar(80) default null,
- take_rate decimal(10,2),
+ take_rate decimal(10,4),
diff --git a/auto/production/daily/etsy_payments_detail.sql b/auto/production/daily/etsy_payments_detail.sql
index 66d424c..f87cb0b 100644
--- a/auto/production/daily/etsy_payments_detail.sql
+++ b/auto/production/daily/etsy_payments_detail.sql
@@ -14,8 +14,8 @@ Toward the end of the script we loop in the ledger for reconciling. Reference et
logic. We add ledger type and ledger date from this last piece. This script makes two tables: rollups.etsy_payments_detail and accounting.etsy_payments_detail
*/
-drop table if exists rollups.etsy_payments_detail;
-create table if not exists rollups.etsy_payments_detail (
diff --git a/auto/production/daily/daily_revenue_script.sql b/auto/production/daily/daily_revenue_script.sql
index c820ae7a..a76b58cb 100644
--- a/auto/production/daily/daily_revenue_script.sql
+++ b/auto/production/daily/daily_revenue_script.sql
@@ -77,11 +77,11 @@ or
and revenue_category='Etsy Ads Revenue')
union all
--Pull from the advector ledger
-select to_timestamp(charge_date)::date as date,
+select to_timestamp(click_date)::date as date,
diff --git a/auto/production/daily/daily_revenue_script.sql b/auto/production/daily/daily_revenue_script.sql
index cae29984..c820ae7a 100644
--- a/auto/production/daily/daily_revenue_script.sql
+++ b/auto/production/daily/daily_revenue_script.sql
@@ -63,6 +63,29 @@ from (
group by 1,2
order by 1,2);
+--Prolist Fix
+drop table if exists all_revenue_prolist_fix;