Updated SQL Export