Použijte Seskupit podle dočasné tabulky s odlišným pacientem a lékařem
select Patient, count(*)
from (
select distinct Bookings.PatientID as Patient ,DoctorID as Doctors
from Bookings ) as t
Group by Patient;
Použijte Seskupit podle dočasné tabulky s odlišným pacientem a lékařem
select Patient, count(*)
from (
select distinct Bookings.PatientID as Patient ,DoctorID as Doctors
from Bookings ) as t
Group by Patient;