📜  Oracle SQL 连接三个表并按列分组 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:33.129000             🧑  作者: Mango

代码示例1
select
  t.name, 
  count(distinct r.idc) as number_of_classes
from
  teacher t
join 
  reserve r on r.idt = t.idt
join
  class c on c.idc = r.idc
group by 
  t.name