当前位置:网站首页>MySQL create given statement

MySQL create given statement

2022-06-25 09:46:00 CSDN Q & A

There is a set of process tracking data , Please use SQL Take out the newly created records in each process . The data structure is as follows , Suppose there are only four fields , In turn ID( Primary key ),PROCESS_INS_ID( Process instance ID),CREATE_TIME( Creation time ),DEAL_UID( Dealing with people )

[{'1','P_1','2019-07-03 18:00:00','ZHANG'},{'2','P_1','2019-07-03 18:01:00','ZHANG'},

{'3','P_1','2019-07-03 18:02:00','ZHANG'},{'4','P_2','2019-07-03 18:00:00','ZHANG'},

{'5','P_2','2019-07-03 18:01:00','ZHANG'},{'6','P_3','2019-07-03 18:00:00','ZHANG'},

{'7','P_3','2019-07-03 18:01:00','ZHANG'},{'8','P_3','2019-07-03 18:02:00','ZHANG'}]

The query result is required to be

{'3','P_1','2019-07-03 18:02:00','ZHANG'} p_1 in Create the latest

{'5','P_2','2019-07-03 18:01:00','ZHANG'} p_2 in Create the latest

{'8','P_3','2019-07-03 18:02:00','ZHANG'} p_3 in Create the latest

Please select based on Oracle perhaps mysql The database gives sql sentence .

原网站

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206181821046229.html