SQL

This part exports the data from database.