Need Sql and table querys written for a project (Preferably in MS Office or PDF

Discussion in 'MySQL' started by mynheer, Apr 26, 2011.

  1. #1
    I need some help creating sql queries and tables for a project i am currently doing
    being honest i am stumped and need someone with proper relevant experience to
    do this for me.

    As i am new to the board i cant place an add in the markerplace to hire someone so im confused as to where to put this only here..

    I am hoping i get a reply here from some reputable coder who can do this for me
    all other details can be discussed in pm

    Regards

    Ben

    Question and details below this is needed for a practice and needs to be done by today

    Regards

    Consider the following Tables:

    Consultant
    Consultant_ID Firstname Surname Senior/Junior Specialism
    1 Hawkeye Pierce Senior Surgeon
    2 Gonzo Gates Junior Oncologist
    3 Julius Hibbird Junior Psychiatrist
    4 Frasier Crane Senior Psychiatrist
    5 John Carter Junior Surgeon
    6 Bob Kelso Senior Oncologist#

    Patient
    Patient_ID Firstname Surname Date_of_Birth
    1 John McNamara 10/10/1965
    2 Mary O'Brien 02/04/1975
    3 Peter Prior 20/07/1999
    4 Joe Jenkins 13/09/1951

    Visit
    Visit_ID Date Time Patient_ID Consultant_ID Fee
    2 02/02/2002 14:00 2 2 €40.00
    3 02/02/2002 15:00 4 2 €50.00
    4 02/03/2002 14:00 2 2 €30.00
    5 02/03/2002 10:00 3 4 €60.00
    6 02/03/2002 11:00 1 3 €20.00
    7 02/04/2002 12:00 4 1 €50.00
    8 02/02/2002 10:00 3 1 €30.00
    9 04/02/2002 12:00 2 6 €50.00
    10 02/04/2002 14:00 2 5 €60.00

    a) Indicate which fields are appropriate Primary Key and Foreign Key fields
    for the above tables.

    b) Given the Primary Keys and Foreign Keys which you have indicated in
    part a, write a SQL CREATE TABLE query which would Create the Visit
    table.
    3
    c) Write a SQL query which will show all senior consultants.

    d) Write a SQL query which will show all senior psychiatrists.

    e) Sort the Visit table by date and time.

    f) Display the total number of patients on the Visit table.

    g) Display the total amount of fees payable by the patients.

    h) Write a SQL query which joins two tables together to display the following
    information:
    • Visit Date
    • Visit Time
    • Patient Firstname
    • Patient Surname

    i) Write a SQL query which joins all three tables together. Include the
    following fields in your answer.
    • Patient Firstname
    • Patient Surname
    • Consultant Firstname
    • Consultant Surname
    • Visit Date
    • Visit Time

    j) Write a SQL GROUP BY query which will show the total amount of money
    billed by each Consultant. Include the following fields in your answer:
    • Consultant_ID
    • Firstname
    • Surname
    • Fee
     
    Last edited: Apr 26, 2011
    mynheer, Apr 26, 2011 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    worth posting what your paying and the method of payment
     
    AstarothSolutions, Apr 26, 2011 IP