<?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.iflytek.astron.console.toolkit.mapper.group.GroupTagMapper">
    <select id="listGroupTagVOByUid" resultType="com.iflytek.astron.console.toolkit.entity.vo.group.GroupTagVO">
        select tag_id as id,name,count(1) as userCount from group_user gu left join group_tag gt  on gu.tag_id = gt.id where gu.uid = #{uid}
        group by tag_id , name
        order by userCount desc
    </select>
</mapper>
