DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   Database Design (http://www.daniweb.com/forums/forum142.html)
-   -   Assignment Help Plz!! Urgent (http://www.daniweb.com/forums/thread76337.html)

ali_rulz Apr 24th, 2007 7:58 am
Assignment Help Plz!! Urgent
 
1 Attachment(s)
hey all
i need to find the birds with the largest number of habitats.
attached is the database i am working with.

i sort of need the solution in about 2hrs time....

thanx ali

ali_rulz Apr 24th, 2007 7:58 am
Re: Assignment Help Plz!! Urgent
 
sorry i forgot to add that i am using winsql and need the query.

stymiee Apr 24th, 2007 9:47 am
Re: Assignment Help Plz!! Urgent
 
Did you write your own query yet? If not, try it and post it here if you are having problems. Otherwise, do your own homework. We're here to help, not do your work for you.

ali_rulz Apr 24th, 2007 9:56 pm
Re: Assignment Help Plz!! Urgent
 
yeh i have written my own code but not even sure if on right track...
Select H.HCode, Count (*)
From Birds B, Habitats H, Bird_Habitats BH
Where B.BirdID = BH.BirdID
Group By H.HCode, B.BirdID
Having Count (*) >= some (Select Count (*)
From Bird_Habitats
Group By BirdID);

and just for the record i wasnt trying to get u to do my homework for me i was purely trying to get help in understanding how to write this particular query!
thanx ali


All times are GMT -4. The time now is 9:08 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC