SELECT SQL_CALC_FOUND_ROWS(a.id)...