SELECT
		A.USER_NAME,
		A.REAL_NAME,
		B.ORI_BONUS_VIP
	FROM
(SELECT
	U.ID,
	U.USER_NAME,
	U.REAL_NAME
FROM
	AR_USER U
		WHERE U.DEC_LV ='67ABCCE20A9F5553E055736AECE8644D') A
		
		LEFT JOIN AR_PERF_MONTH M ON M.USER_ID = A.ID 
	AND M.CALC_MONTH = 202104 
	AND ( M.VIP_PV_1L_ZC + M.VIP_PV_2L_ZC + M.VIP_PV_3L_ZC ) - GREATEST( M.VIP_PV_1L_ZC, M.VIP_PV_2L_ZC, M.VIP_PV_3L_ZC ) >= 9800
	LEFT JOIN AR_CALC_BONUS B ON B.USER_ID = A.ID 
	AND B.CALC_MONTH = 202104 