table_forum
|id_forum|name_forum|
| 1 |forum 1 |
| 2 |forum 2 |
table thread
|id_thread|name_thread|id_forum|
| 1 |thread 1 | 1 |
| 2 |thread 2 | 1 |
I need a query that returns
|name_forum|thread|
| forum 1 | 2 |
| forum 2 | 0 |
Can you help me please?
If they are two tables as i guess try like this