clear markdown compare help donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 462178 distinct fiddles created so far.

create table students (student_id integer, student_name varchar(100));
 hidden batch(es)


insert into students(student_id,student_name) select 1, 'Alice' from dual union all select 2, 'Bob' from dual union all select 3, 'Charlie' from dual;
3 rows affected
 hidden batch(es)


create table courses (course_id integer, professor_id integer);
 hidden batch(es)


insert into courses select 9+level, mod(level,3)+101 from dual connect by level<=10;
10 rows affected
 hidden batch(es)


create table takes_courses (student_id integer, course_id integer);
 hidden batch(es)


insert into takes_courses select student_id, course_id from students cross join courses where course_id<10+student_id*3;
18 rows affected
 hidden batch(es)


select student_name from students where student_id in ( select student_id from( select distinct student_id, professor_id, course_id from takes_courses join courses using(course_id) ) group by student_id, professor_id having count(*)>1 );
STUDENT_NAME
Bob
Charlie
 hidden batch(es)