| | |
| | | count(if(behavior=1,1,null)) oilCount, |
| | | sum(oil_volume) oilVolume, |
| | | sum(spand_time) sumSpand, |
| | | count(DISTINCT if(behavior=1, r.license_num, null)) onceOilCount |
| | | count(DISTINCT if(behavior=1, r.license_num, null)) onceOilCount, |
| | | sum(if(behavior=1, total_amount, 0)) totalAmount |
| | | from t_oil_record r |
| | | join ( |
| | | select sum(car_count) carCount from t_traffic_flow |
| | |
| | | ) f on m.model_code = f.model_code |
| | | </select> |
| | | |
| | | <select id="statFanByOilType" resultType="com.tievd.jyz.entity.vo.StatDataTableVo" parameterType="com.tievd.jyz.entity.vo.DataStatisReqVo"> |
| | | select |
| | | count(if(behavior=1,1,null)) oilCount, |
| | | sum(oil_volume) oilVolume, |
| | | sum(if(behavior=1, total_amount, 0)) totalAmount, |
| | | oil_type oilType |
| | | from t_oil_record |
| | | <include refid="statRecordCondition" /> |
| | | and oil_type is not null and oil_type != '' |
| | | GROUP BY oil_type |
| | | </select> |
| | | |
| | | <select id="getVehicleFrequencyBeforeActivity" resultType="java.util.Map"> |
| | | SELECT |
| | | COUNT(DISTINCT license_num) as totalVehicles, |