SELECT usd.id, usd.school_id, usd.school_name, usd.total_students_all_grades,usd.school_city,usd.school_level,usd.school_type ,usd.charter_school,usd.school_zip, usd.school_state,usd.total_classroom_teachers,usd.magnet_school,usd.CountyFIPS,usd.County, usd.lowgrade_offered as lowgrade, usd.highgrade_offered as highgrade, usd.phone_number as phone, usd.school_address as address, usd.lat as latitude, usd.longr as longitude, usd.CountyFIPS as county_number, usd.County as county_name, IF(total_students_all_grades>white_not_hispanic_students,total_students_all_grades-white_not_hispanic_students,0) AS students_color_amount, 'PSR' as site_id,usd.lat as lat, usd.longr as lng, maz.nces_schid as nces_schid ,ts.id AS townid,smi.blueribbon,smi.blueribbon_years,smi.website,sp.id AS photo_id FROM universe_survey_data AS usd INNER JOIN school_more_info AS smi ON usd.school_id = smi.school_id LEFT JOIN town_stats AS ts ON usd.school_city=ts.school_city AND usd.school_state = ts.school_state LEFT JOIN school_photos AS sp ON usd.school_id = sp.school_id LEFT JOIN maponics_attendance_zone maz ON maz.nces_schid=usd.NCESSCH AND maz.ed_level=IF(usd.school_level=1,'P', IF(usd.school_level=2, 'M', IF(usd.school_level=3, 'H', IF(usd.school_level=4, 'O', NULL)))) WHERE usd.approved = 1 AND usd.school_level IN (1,2,3,4) AND usd.school_state='MI' AND (usd.CountyFIPS='26099') GROUP BY usd.school_id ORDER BY school_name ASC