I have four tables as below

**table-1**

mysql> `select * from PDB_PROFILE` ;

```
+-------+------------------------+-------------+-------------------+-----------------------------------------------------------+
| PR_ID | PR_NAME                | PR_PARENTID | PR_TYPE           | PR_KEY                                                    |
+-------+------------------------+-------------+-------------------+-----------------------------------------------------------+
|  1094 | suresh                 |        1077 | service           | serviceproviders::smstest::suresh                         |

```

**table-2**

mysql> select \* from MDB\_PERMITTED\_ADDRESS;

```
+---------+------------+
| ADDRESS | SERVICE_ID |
+---------+------------+
| 4444    |       1094 |
+---------+------------+

```

**table-3**

mysql> select \* from MDB\_SERVICE\_CONN\_PR;

```
+-------+----------------+-----------------+----------------+--------+------------+---------------------+
| PR_ID | DRIVER_CONN_ID | ALLOCATION_TYPE | EXC_SERVICE_ID | EXT_ID | DEFAULT_OA | SC_ASSIGN_DATE      |
+-------+----------------+-----------------+----------------+--------+------------+---------------------+
|  1161 |           1158 | e               |           1094 |   NULL | NULL       | 2014-08-14 11:28:20 |
+-------+----------------+-----------------+----------------+--------+------------+---------------------+

```

**table-4**

mysql> select \* from MDB\_DRIVER\_CONN\_PR;

```
+-------+-----------+-----------+------+--------------+-------------+---------+------------+-----------+--------------------+---------------+---------------------+
| PR_ID | DRIVER_ID | PARENT_ID | TYPE | SHORT_NUMBER | DESCRIPTION | ID_TYPE | DEFAULT_OA | IS_GLOBAL | DEFAULT_SERVICE_ID | CONN_CATEGORY | SC_CREATION_DATE    |
+-------+-----------+-----------+------+--------------+-------------+---------+------------+-----------+--------------------+---------------+---------------------+
|  1158 |      1067 |      NULL | SMS  | 2222*        |             | s       | 2222       | n         |               NULL | Generic       | 2014-08-14 11:28:07 |
+-------+-----------+-----------+------+--------------+-------------+---------+------------+-----------+--------------------+---------------+---------------------+

```

check the first table where PR\_TYPE=service then need to take PR\_ID for the same and get data from other three tables wrt PR\_ID

finally i require output as below

```
+------------------------+------------+---------+
| PR_NAME                | DEFAULT_OA | ADDRESS |
+------------------------+------------+---------+
| suresh                 | 2222       | 4444    |
+------------------------+------------+---------+

```