the relations are
MEMBERSHIP(membership_number (pk), cover_type(pk),
start_date(pk), end_date)
PERSON(person_number(pk), surname, initials, street_address, suburb, ,
membership_number)
DOCTOR(doctor_number(pk), surname, initials, street_address, suburb)
PROVIDED-SERVICE(person_number(pk), doctor_number(pk), service_date(pk),
service_number)
REBATE(service_number(pk), cover_type(pk), refund)
SERVICE(service_number(pk), service_name, service_description)
i am struggling in this query can any one help me
1)List the service-names and maximum refund payable for those services
which have been provided to every person who has visited a doctor.
this query asks for info about those services provided to every person
who has visited a doctor. For each such services, list the name of the
service and the maximum refund for that service (i.e. the same service
can have many different refunds, only list the highest refund). Maximum
refund therefore refers to the maximum for each such service, not a
maximum across all services.
2)what is the name and address of the doctor, or doctors, who have
provided services to the smallest non-zero number of individual
patients (regardless of the number of services they provided to
each patient)?
i dont the answers for these queries if anyone help me in this regard i
would be so thankful
--
Posted via
http://dbforums.com