insert historical

query for insert historical data