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.
我需要有关 mysql 查询的帮助,我想检索我们的 Magento(CE v1.7.0.2) 客户生命周期价值。
这实际上是客户从开始到现在分成几个月的平均总订单量。
谢谢
你可以试试这样的
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