さて私は3つのテーブルを手に入れました:
tb1:
tb1_id PK
tb1_name
tb2:
tb2_id PK
tb1_id FK
tb3:
tb3_id PK
tb2_id FK
そして私はこのクエリを受け取りました:
select a.tb1_nome
      ,b.tb2_id
      ,count(c.tb2_id) as lins 
 from tb1 a 
      left join tb2 b on a.tb1_id=b.tb1_id 
      left join tb3 c on b.tb2_id=c.tb2_id 
 group by b.tb2_id order by a.tb1_id desc
ただし、tb1のすべての行を返すわけではありません。