thanks denny, a little over my head but i will give them a go - haha.
thanks heaps. mike >Hrm, you could do: > >SELECT DISTINCT girl_name AS name, COUNT(girl_name) AS entries, "girl" AS >gender >FROM kidsnames >GROUP BY girl_name >UNION >SELECT DISTINCT boy_name AS name, COUNT(boy_name) AS entries, "boy" AS >gender >FROM kidsnames >GROUP BY boy_name >ORDER BY 2 DESC > >but that doesn't limit you to five, or girls or boys, that's just going by >the numbers. > >So I guess split it into two queries, like for one: > >SELECT DISTINCT girl_name AS name, COUNT(girl_name) AS entries, "girl" as >gender >FROM kidsnames >GROUP BY girl_name LIMIT 5 > >but you'd have to use TOP instead of LIMIT if you're using MSSQL, for >example. > >Bah. Simple queries, not very elegant. Surely there are better, more >awesome ways to do it. >It will get you going, though, I guess. > >HTH >:D > >On 6/21/06, Mike | NZSolutions Ltd <[EMAIL PROTECTED] > wrote: >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244508 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

