sql选择并从2表计数

第一表(公司)

id    Name        LOGO
1     iphone     ../763.jpg
2     Sony       ../345.jpg
3     Samsung    ../678.jpg

第二表(操作)

id   company_id   status
1        1         new
2        1         new
3        1         repaired
4        1         Consists
5        2         new
6        2         new
7        3         repaired
8        3         Consists
9        3         repaired

结果应该是这样的

LOGO         Total      new     repaired    Consists    
../763.jpg     4         2          1          1
../345.jpg     2         2          0          0
../678.jpg     3         0          2          1