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='20' AND aa.typeID=b.cityID) INNER JOIN ( SELECT `cityID`, ROUND((((acos(sin((47.6062095*pi()/180)) * sin((`lat`*pi()/180))+cos((47.6062095*pi()/180)) * cos((`lat`*pi()/180)) * cos(((-122.3320708- `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='42' ORDER BY cll.miles, b.name LIMIT 5