Advertisement
Maks140888

Untitled

Jun 8th, 2022
1,022
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. where t.id = h.teacher_id
  2. and h.day_date between to_date('2022-06-06','YYYY-MM-DD') and to_date('2022-06-12','YYYY-MM-DD')
  3. group by t.name, h.day_date
  4. having count(h.lesson_id) = (
  5.     select count(teacher_id) from sheldule, teachers
  6.     where
  7.     day_date = h.day_date
  8.     and sheldule.teacher_id = teachers.id
  9.     and teachers.name = t.name
  10.     group by lesson_id
  11.     having count(teacher_id) > 1 ) 
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement