|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
SELECT B.三组合, B.订单号之计算
FROM (SELECT A.三组合, Count(A.订单号) AS 订单号之计算
FROM (SELECT 订单.订单号, 订单.商品, T1.商品, T2.商品, 订单.商品 & T1.商品 & T2.商品 AS 三组合
FROM (订单 INNER JOIN 订单 AS T1 ON 订单.订单号=T1.订单号) INNER JOIN 订单 AS T2 ON T1.订单号=T2.订单号
WHERE ((订单.商品>T1.商品) AND (T1.商品>T2.商品))) AS A
GROUP BY A.三组合) AS B
WHERE (((B.订单号之计算)in (SELECT TOP 10 B.订单号之计算
FROM
(SELECT A.三组合, Count(A.订单号) AS 订单号之计算
FROM (SELECT 订单.订单号, 订单.商品, T1.商品, T2.商品, 订单.商品 & T1.商品 & T2.商品 AS 三组合
FROM (订单 INNER JOIN 订单 AS T1 ON 订单.订单号=T1.订单号) INNER JOIN 订单 AS T2 ON T1.订单号=T2.订单号
WHERE ((订单.商品>T1.商品) AND (T1.商品>T2.商品))) AS A
GROUP BY A.三组合
ORDER BY Count(A.订单号) DESC) as B))); |
|