Skip to content
super_case_study
DataFrameas
df
variable
-- List of all chargeback reasons
SELECT DISTINCT REASON
FROM 'data_cb_sheet1.csv';DataFrameas
df3
variable
-- Calculate the 'fraud' reason count and the dollar sum of all 'fraud'
SELECT COUNT(*) AS count, ROUND(SUM(AMOUNT_DISPUTED),2) AS dollar_amount
FROM 'data_cb_sheet1.csv'
WHERE REASON = 'fraud'
DataFrameas
df2
variable
-- the top 5 cities for fraud chargebacks
SELECT HOTEL_CITY, REASON, SUM(AMOUNT_DISPUTED) AS AMOUNT_DISPUTED_SUM
FROM 'data_cb_sheet1.csv'
WHERE REASON = 'fraud'
GROUP BY HOTEL_CITY, REASON
ORDER BY AMOUNT_DISPUTED_SUM DESC
LIMIT 5;
Current Type: Bar
Current X-axis: HOTEL_CITY
Current Y-axis: AMOUNT_DISPUTED_SUM
Current Color: None
Top 5 Cities for Chargebacks