所以基本上,我已经叫一表“TABLE_1”:
ID Index STATUS TIME DESCRIPTION
1 15 pending 1:00 Started Pending
1 16 pending 1:05 still in request
1 17 pending 1:10 still in request
1 18 complete 1:20 Transaction has been completed
2 19 pending 2:25 request has been started
2 20 pending 2:30 in progress
2 21 pending 2:35 in progess still
2 22 pending 2:40 still pending
2 23 complete 2:45 Transaction Compeleted
我需要将这些数据插入到我的第二个表“TABLE_2”只有开始和compelete时间都包括在内,所以我的“TABLE_2”应该是这样的:
ID Index STATUS TIME DESCRIPTION
1 15 pending 1:00 Started Pending
1 18 complete 1:20 Transaction has been completed
2 19 pending 2:25 request has been started
2 23 complete 2:45 Transaction Compeleted
如果任何人都可以帮我写的SQL查询为了这个,我会非常感激。 提前致谢