Advertisement
Guest User

Untitled

a guest
Apr 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.28 KB | None | 0 0
  1. select substr(students.n_gr, 0, 1), count(distinct students_hobby.h_name)
  2. from students
  3.   join students_hobby on students_hobby.n_z = students.n_z
  4.   join hobby on hobby.h_name = students_hobby.h_name
  5. where
  6.   students_hobby.d_finish is null
  7. group by substr(students.n_gr, 0, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement