R
Rohit Nepali
Hi I'm have problem with a simple query. I hope someone can help me.
The table structure is :
Doctor(DName,BirthDate)
Patient(PName,BirthDate)
IsDoctoredBy(DName,PName,LastCheckDate)
Sql query to find the Name of Doctor who has checked maximum patients?
"select max(count(Pname)) from isdoctoredby group by Dname" this query
gives maximum value but I want the Dname too.
"select DName, max(count(Pname)) from isdoctoredby group by Dname" gives
error!!
Thanks in advance.
With regards,
Rohit
The table structure is :
Doctor(DName,BirthDate)
Patient(PName,BirthDate)
IsDoctoredBy(DName,PName,LastCheckDate)
Sql query to find the Name of Doctor who has checked maximum patients?
"select max(count(Pname)) from isdoctoredby group by Dname" this query
gives maximum value but I want the Dname too.
"select DName, max(count(Pname)) from isdoctoredby group by Dname" gives
error!!
Thanks in advance.
With regards,
Rohit