Looks like a kind of Entity-Attribute-Value mapping to me.
Re-ordering the table to make things a
little clearer:
+----+------------+--------+-----------+
| id | request_id | udf_id | udf_value |
+----+------------+--------+-----------+
| 74 | 25 | 2 | Hary |
| 75 | 25 | 3 | 1569843 |
| 77 | 26 | 2 | George |
| 78 | 26 | 3 | 1625701 |
| 80 | 27 | 2 | Sherry |
| 81 | 27 | 3 | 1340979 |
+----+------------+--------+-----------+
For any given request_id, there will be one entry with udf_id=2 that holds the name and another with udf_id=3 that holds the opus_id.
You'll need to join to this table
twice, once to get the name value and another to get the opus value:
select ...
from v6z59_sv_apptpro3_requests a
inner join v6z59_sv_apptpro3_udfvalues udf_name
on a.request_id = udf_name.request_id
and udf_name.udf_id = 2
inner join v6z59_sv_apptpro3_udfvalues udf_opus
on a.request_id = udf_opus.request_id
and udf_name.udf_id = 3
where ...
Regards, Phill W.