sql按照日期和人分组显示
select date_format(approve_time ,'%Y-%m-%d' ) approveTime, trial_person approvePerson, count(order_status='11' or order_status='12' or NULL) approveTotalCount, count(order_status='12' or NULL) unPassCount, count(order_status='11' or NULL) passCount, concat(truncate((count(order_status='11' or NULL)/count(order_status='11' or order_status='12' or NULL)) * 100, 2), '%') passRate, concat(truncate((count(order_status='12' or NULL)/count(order_status='11' or order_status='12' or NULL)) * 100, 2), '%') unPassRate, count(reject_type='1' or NULL) bigButLIttleCount, count(reject_type='2' or NULL) littleButBigCount, count(reject_type='3' or NULL) vehicleTypeErrorCount, count(reject_type='4' or NULL) vehicleColorErrorCount, count(reject_type='5' or NULL) vehicleLicenseErrorCount, count(reject_type='6' or NULL) cardNotSuitCount, count(reject_type='7' or NULL) errorVehicleTypeCount, count(reject_type='8' or NULL) otherCount from tb_online_retailers_check_order
效果
迎风少年
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步