<sql id="firstChargeInfoSQL"> SELECT companyid as companyid , chargeid as firstChargeId, addtime as firstChargeT ime, currentmoney as firstChargeAmount FROM ( SELECT companyid, chargeid, addtime, currentmoney FROM ${database_51p2badmin}.pb_bchargelog WHERE status = 2 ORDER BY addtime ASC ) temp GROUP BY companyid </sql >
|