<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.zlpt.bigscreen.mapper.BmMachinistInfoMapper">

    <select id="selectMachinistInfoList" resultType="com.bonus.zlpt.bigscreen.domain.vo.CompanyInfoVo">
        SELECT c.company_ltd AS ownCo, COUNT(*) AS count
        FROM bm_company_info c
        LEFT JOIN bm_operator_info m ON c.company_name = m.own_co
        GROUP BY c.company_ltd
    </select>
</mapper>