Gunakan Kelompokkan melalui tabel sementara dengan pasien dan dokter yang berbeda
select Patient, count(*)
from (
select distinct Bookings.PatientID as Patient ,DoctorID as Doctors
from Bookings ) as t
Group by Patient;
Gunakan Kelompokkan melalui tabel sementara dengan pasien dan dokter yang berbeda
select Patient, count(*)
from (
select distinct Bookings.PatientID as Patient ,DoctorID as Doctors
from Bookings ) as t
Group by Patient;