Historical data query and returned data parse added

Added
1. historical database query
2. Parse of returned  DataTable