1. 程式人生 > >對於mysql處理資料庫表中一對多的資料統計問題

對於mysql處理資料庫表中一對多的資料統計問題

今天遇到一個問題,就是要統計一個數據庫表中的相同欄位的條數的問題。

SELECT conferenceId, COUNT(*) as num FROM meet_conference_attendee  where conferenceId in (100740609,101650330,104095246) GROUP BY conferenceId ;

關於group by

http://zousheng.blog.163.com/blog/static/345363920108270207705/

關於MySQL中concat函式

http://zac110.iteye.com/blog/1582382