统计百分比

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBoriginal
2016-06-07 14:57:561035parcourir

无详细内容 无 SELECTMerId,VenderName,ShoppingMonth,TotalOrderNumber,SuccessOrderNumber,TotalPayAmount,SuccessTotalPayAmount, CASE TotalOrderNumber WHEN 0 THEN '0%' ELSE CONVERT(varchar,CONVERT(DECIMAL(10,2),CONVERT(DECIMAL(16,2), SuccessOrd

SELECT
	MerId,
	VenderName,
	ShoppingMonth,
	TotalOrderNumber,
	SuccessOrderNumber,
	TotalPayAmount,
	SuccessTotalPayAmount,
  CASE TotalOrderNumber  
  WHEN 0 THEN '0%'
  ELSE CONVERT(varchar,CONVERT(DECIMAL(10,2),CONVERT(DECIMAL(16,2), SuccessOrderNumber)*1.0/CONVERT(DECIMAL(16,2), TotalOrderNumber)*100 ))+'%'   
  END   AS SuccessRate
FROM
	Vender v
LEFT JOIN GNETE_MER_STAT_MONTHS s ON v.VenderID = s.MerId
WHERE
	ShoppingMonth BETWEEN 201403
AND 201406
AND v.Deleted = 0
GROUP BY
	MerId,
	VenderName,
	ShoppingMonth,
	TotalOrderNumber,
	SuccessOrderNumber,
	TotalPayAmount,
	SuccessTotalPayAmount
ORDER BY
	MerId ASC,
	ShoppingMonth ASC
统计百分比
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn