{"name":"gist: 969547","desc":"","actor":"abunsen","url":"https://gist.github.com/969547","snippet":"SELECT SUM(Transaction.amount) AS total_revenue, COUNT(DISTINCT(Customer.id)) AS number_of_customers, total_revenue/number_of_customers AS average_customer_ltv FROM Customer LEFT JOIN Transactions ON (Transaction.customer_id = Customer.id AND Transaction.approved = 1) WHERE Customer.signup_date BETW","actor_gravatar":"cfbc18690525ba268dc11a7847f72f3f","action":"update"}