<?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="org.king.modules.ad.mapper.AdDeviceMapper">

    <select id="getDeviceCount" resultType="org.king.modules.ad.entity.AdDevice">
        SELECT
        type,
        COUNT( 1 ) count
        FROM
        ad_device
        where is_del=0
        GROUP BY
        type;
    </select>

</mapper>