SELECT * FROM (SELECT project_name,IFNULL(sum(code_submit_line),0)AS submitLine FROM code_submit_daily_collection where submit_people_en is not null and collection_day BETWEEN '2021-05-25 00:00:00' and '2021-05-27 00:00:00' group by project_id LIMIT 10) AS temp ORDER BY submitLine DESC;