Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2006
    Posts
    20

    Unanswered: help with SQL queries please

    hi

    could anyone please help me some SQL queries?

    i have the following tables:

    http://img.photobucket.com/albums/v...a66/tables2.jpg

    and just needed help on constructing these SQL queriers:

    1. show a list of the sponsers and which elephants they sponser. include sponsers name and amount sponsered.

    2. show a count of how many volunteers work at each sanctuary.

    3. provide a list of baby elephants born in august 2006, include their name dob and mothers name.

    4. display the emergency contact details for a member of staff called "bob jones"


    any help with any of these queries will be greatly appreciated.

  2. #2
    Join Date
    Nov 2006
    Posts
    20
    so for query number 3 i have:


    SELECT DOB, UNIQUE NUMBER, BABY NAME, GENDER, MOTHER NAME

    FROM BABY ELEPHANT

    WHERE DOB = "AUGUST 2006"


    does this sound about right?
    i dont have access to a SQL program so its hard to test the actual queries. :/

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    First order of business, we don't do homework outright. We might offer comments or help, but we don't do it outright.

    Second, your diagram is missing, the Photo Bucket web site generates a 404 page when I try to follow that link.

    -PatP
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 2006
    Posts
    20

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'm hoping that the diagram you've posted is old, because it doesn't have some of the columns from your SELECT statement,and it also doesn't seem to have much of the information needed to solve the questions in your homework.

    -PatP

  6. #6
    Join Date
    Nov 2006
    Posts
    20
    as far as i can see all the information is present to answer the questions.
    what information are you referring to that is not present?

  7. #7
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    YOUR queries are not present.

    Also, how on Earth are you going to study SQL without a database?!? If you ate without food, you'd already be dead. Lucky you, databases usually don't kill.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •