Added query to check all of database and parse
data into matlab.