SunQuest
           Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old October 17th, 2003, 03:18 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
help in sql query

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

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > help in sql query


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway