added the extraction data handling, and build sql