1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

How many patients were seen by each clinic for every referring doctor, include doctor

Discussion in 'SQL PL/SQL' started by gumby, Dec 2, 2011.

  1. gumby

    gumby Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    looking fpr a jhint to write this query
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Re: How many patients were seen by each clinic for every referring doctor, include do

    You need to supply the table structure and some sample data. How can anyone give you a hint when you won't state details of the problem?
     
  3. gumby

    gumby Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    looking for a hint from someone with some sense to write a sql in oracle to the following...the documents are attached

    How many patients were seen by each clinic for every referring doctor, include doctor’s
    name and city
     

    Attached Files:

  4. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Re: How many patients were seen by each clinic for every referring doctor, include do

    What we are looking to see is, possibly, a create table script and insert statements to build the schema locally. This diagram doesn't help much as it doesn't state data types or not null constraints. Your post has also been moved to the Oracle forums.

    One hint I can provide is this requires inner joins to return the proper data from the listed tables. You have covered this topic in class and have notes?
     
  5. gumby

    gumby Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    Re: How many patients were seen by each clinic for every referring doctor, include do

    howcome the post is moved to forums
    there is some sample data attached.
    ...the slides and notes don't contain a particular example
    two questions are what source would be best to locate an explanation of the concepts to solve my sql...and does this sql require a subquery
     
  6. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Re: How many patients were seen by each clinic for every referring doctor, include do

    It is moved to the ORACLE Forums because it's not a Mysql issue according to your last post:

    "looking for a hint from someone with some sense to write a sql in oracle..."

    There are many ways to solve this problem however some of those methods may not have been taught to you yet, therefore it's necessary for you to provide as MUCH information on the assignment as you can if you truly want assistance. Does it require a subquery? Probably not, but that doesn't mean you couldn't use one to produce the required results.

    As you provide more information we can provide more help.
     
  7. gumby

    gumby Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    Re: How many patients were seen by each clinic for every referring doctor, include do

    what more details is required to further assist solving this
    I have learned the concepts of oracle thru subquery...this problem I presume entails subquery , one of the last sql syntax learned as it one of the last problems to solve this semester...as far as joins go...I presume it certainly requires join syntax,,,,the syntax I use is ANSI
     
  8. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Re: How many patients were seen by each clinic for every referring doctor, include do

    What have YOU written in an attempt to solve this? Have you thought about solving this in pieces? See here:

    http://oratips-ddf.blogspot.com/2011/10/thats-your-problem.html

    to see different approaches to problem solving and for how to state a problem so that it can be solved.

    Out of curiosity have you asked your instructor for guidance on this?
     
  9. gumby

    gumby Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    Re: How many patients were seen by each clinic for every referring doctor, include do

    the instructor won;t help
    do you know this work?????
    I never receive other replies from someone else....what is it you require a fee to provide a lead to solving it
     
  10. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    Re: How many patients were seen by each clinic for every referring doctor, include do

    Hi Gumby,

    As a policy, we do not provide complete solutions to homework / class assignments because we want YOU to attempt the solution first. Attempt it and ask us where you get stuck. Get your hands dirty and write some code, then we will fix it for you if you need help.

    All the best.
     
  11. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Re: How many patients were seen by each clinic for every referring doctor, include do

    I have provided a 'lead' in solving this with the join comment and the additional statement about subqueries. To insult me with your 'fee' comment does nothing to help your situation. Apparently you don't want leads, you want someone else to write your assignment. I will NOT do that for any reason; it's your responsibility to complete your assignments. You have yet to provide any evidence of your attempts to solve this and I cannot believe that your instructor won't assist you with this. I DO believe your instructor won't write it for you and that is exactly what you seem to be asking others to do.

    When you show us you've made an attempt we can direct you if you've gone astray. Again, no one here will write it for you. That is YOUR job.
     
  12. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    Re: How many patients were seen by each clinic for every referring doctor, include do

    As suggested, Please provided the following for getting a better solution.

    1. Create and insert script for the sample data.
    2. Query you tried to get the output
    3. Out put of your query
    4. Query you are expecting.