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

11 Years
Discussion Span
Last Post by ali_rulz

sorry i forgot to add that i am using winsql and need the query.


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.


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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.