Query editor
--Monthly Active Users|mauWITH mau AS (SELECTDATE_TRUNC('month', block_date) AS month_start,COUNT(DISTINCT sender) AS mauFROM fuel.receiptsGROUP BY DATE_TRUNC('month', block_date))SELECTDATE_TRUNC('day', r.block_date) AS day_start,COUNT(DISTINCT r.sender) AS dau,mau.mau,COUNT(DISTINCT r.sender) * 1.0 / mau.mau AS stickiness_ratio -- Use 1.0 for floating-point calculationFROM fuel.receipts rJOIN mauON DATE_TRUNC('month', r.block_date) = mau.month_startGROUP BYDATE_TRUNC('day', r.block_date),mau.mauORDER BYDATE_TRUNC('day', r.block_date);