Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

Oracle SQL join three tables and group by column

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Oracle #SQL #join #tables #group #column
ADD COMMENT
Topic
Name
6+5 =