The data is as follows:
303 standard category TR_STANDARD_MANAGER
107 inspection record category TR_PATROL_LOG
61 inspection record category TR_PATROL_LOG
221 TR_REPAIR_LOG
121 Maintenance Management Plan category TR_REPAIR_PLAN
141 Maintenance Management Plan category TR_REPAIR_PLAN
24 device management category TR_PATROL_PLAN_1
105 inspection plan Category TR_PATROL_PLAN
108 Maintenance Management Plan category TR_REPAIR_PLAN
109 TR_REPAIR_LOG
1 inspection plan Category TR_PATROL_PLAN
2 inspection record category TR_PATROL_LOG
26 equipment management category TR_PATROL_PLAN_1
142 TR_REPAIR_LOG
145 accident type TR_ACCIDENT
144 accident type TR_ACCIDENT
261 inspection plan Category TR_PATROL_PLAN
147 load type TR_BURTHEN
262 inspection plan Category TR_PATROL_PLAN
265 inspection plan Category TR_PATROL_PLAN
267 Maintenance Management Plan category TR_REPAIR_PLAN
268 Maintenance Management Plan category TR_REPAIR_PLAN
269 accident type TR_ACCIDENT
146 accident type TR_ACCIDENT
283 standard category TR_STANDARD_MANAGER
263 inspection plan Category TR_PATROL_PLAN
5 Data Category TR_EQUP_ATT_INFO
266 Maintenance Management Plan category TR_REPAIR_PLAN
281 data category TR_EQUP_ATT_INFO
//////////////////////////////////////// //
You need to obtain a non-repeated category name and the corresponding primary key id.
Select scop_name, RUN_TYPE_ID from tr_type a where
RUN_TYPE_ID = (select max (RUN_TYPE_ID) FROM tr_type B where a. scop_name = B. scop_name)