If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > help with SQL queries please

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-04-06, 08:16
monkeymafia monkeymafia is offline
Registered User
 
Join Date: Nov 2006
Posts: 20
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.
Reply With Quote
  #2 (permalink)  
Old 11-04-06, 09:30
monkeymafia monkeymafia is offline
Registered User
 
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. :/
Reply With Quote
  #3 (permalink)  
Old 11-04-06, 10:03
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
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
File Type: pdf nogo.pdf (37.1 KB, 129 views)
Reply With Quote
  #4 (permalink)  
Old 11-04-06, 10:17
monkeymafia monkeymafia is offline
Registered User
 
Join Date: Nov 2006
Posts: 20
Reply With Quote
  #5 (permalink)  
Old 11-04-06, 10:22
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
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
Reply With Quote
  #6 (permalink)  
Old 11-04-06, 10:25
monkeymafia monkeymafia is offline
Registered User
 
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?
Reply With Quote
  #7 (permalink)  
Old 11-04-06, 14:53
Littlefoot Littlefoot is offline
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,629
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On