change SQL query for extent on GO