标签: mysql hibernate criteria
SELECT th.`id`,th.`type`,th.`url_label`,url.`url`,COUNT(th.`id`) FROM `threat` th LEFT JOIN `threat_url` url ON th.`id`= url.`threat_id` WHERE th.enterprise_id=1816 AND th.`status` != 'deleted' GROUP BY th.`id` ORDER BY COUNT(th.`id`) DESC ;