mysql error: Unknown column 'aa.areaType' in 'on clause'
SQL: SELECT b.name, b.address, c.name AS city, b.state, b.zip#, b.displayPhone, b.displayPhoneNumber FROM businesses AS b INNER JOIN business_industries AS bi ON b.businessID=bi.businessID INNER JOIN area_availability AS area_availability ON (aa.areaType='city' AND aa.group_id='18' AND aa.typeID=b.cityID) INNER JOIN ( SELECT `cityID`, ROUND((((acos(sin((39.2806451*pi()/180)) * sin((`lat`*pi()/180))+cos((39.2806451*pi()/180)) * cos((`lat`*pi()/180)) * cos(((-80.3445341- `long`)*pi()/180))))*180/pi())*60*1.1515), 1) AS miles FROM city_lat_long GROUP BY cityID HAVING miles<=20 ORDER BY miles ) AS cll ON b.cityID=cll.cityID INNER JOIN cities AS c ON b.cityID=c.cityID WHERE bi.industryID='135' ORDER BY cll.miles, b.name LIMIT 5