|
@@ -162,14 +162,15 @@
|
|
|
SELECT
|
|
SELECT
|
|
|
personName,
|
|
personName,
|
|
|
otherName,
|
|
otherName,
|
|
|
- STRING_AGG(DISTINCT otherCardNo, ',') AS otherCardNos,
|
|
|
|
|
|
|
+ otherCardNo,
|
|
|
SUM(pair_total_trans) AS pairTotalTrans,
|
|
SUM(pair_total_trans) AS pairTotalTrans,
|
|
|
SUM(pair_total_amount) AS pairTotalAmount,
|
|
SUM(pair_total_amount) AS pairTotalAmount,
|
|
|
SUM(pair_cont_month_count) AS pairContMonthCount
|
|
SUM(pair_cont_month_count) AS pairContMonthCount
|
|
|
FROM qualified_groups
|
|
FROM qualified_groups
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
personName,
|
|
personName,
|
|
|
- otherName
|
|
|
|
|
|
|
+ otherName,
|
|
|
|
|
+ otherCardNo
|
|
|
ORDER BY
|
|
ORDER BY
|
|
|
pairContMonthCount DESC,
|
|
pairContMonthCount DESC,
|
|
|
pairTotalTrans DESC
|
|
pairTotalTrans DESC
|