I have this which works lovely..<BR><BR>listSQL="SELECT s.*, c.* FROM sites s,countrys c WHERE s.subcode=" & subcode & " and s.scountry=c.countrycode ORDER by " & mysort<BR><BR>I want to also show the number of hits they have had so am trying this but it is only pulling up a few records and tallying all hits into one. ??<BR><BR>listSQL="SELECT s.*, c.*,SUM(stats.hitcount) AS totalhits FROM sites s,countrys c LEFT OUTER JOIN stats ON s.siteid=stats.linkid WHERE s.catcode=" & catcode & " and s.scountry=c.countrycode GROUP BY hitcount ORDER by " & mysort<BR>