Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Magento (CE v1.7.0.2) の顧客生涯価値を取得したいのですが、mysql クエリのサポートが必要です。
これは実際には、最初から現在までの顧客による平均合計注文数を月に分割したものです。
ありがとう
このようなものを試すことができます
SELECT DISTINCT customer_email, customer_firstname, customer_lastname, SUM(subtotal_invoiced) AS Total FROM `sales_flat_order` AS a GROUP BY customer_email ORDER BY SUM(subtotal_invoiced) DESC