I have a table named tb\_customer master.

```
mysql> select COSTUMER_ID, NAMA, ATTENTION, IN_DATE, IN_REF, JOB_REF, LAST_CARGO FROM tb_customer_master;
+-------------+----------------------+-------------------------+------------+--------+---------+----------------------+
| COSTUMER_ID | NAMA                 | ATTENTION               | IN_DATE    | IN_REF | JOB_REF | LAST_CARGO           |
+-------------+----------------------+-------------------------+------------+--------+---------+----------------------+
|           2 | Eagletainer          | Ms. Joyce Ong Chong Mei | NULL       | 1234   | 123     | Lube                 |
|           5 | APL                  | Test                    | 21-11-2015 | sgdgfa | sgfsd   | FOOD                 |
+-------------+----------------------+-------------------------+------------+--------+---------+----------------------+
2 rows in set (0.00 sec)

```

And I have table too as table master that have behavior as a report master

```
mysql> select REPAIR_ESTIMATE_ID, EIR_REF, COSTUMER_ID FROM tb_master_repair_estimate;
       +--------------------+------------+-------------+
       | REPAIR_ESTIMATE_ID | EIR_REF    | COSTUMER_ID |
       +--------------------+------------+-------------+
       |                 38 | 1545053    |           5 |
       |                 40 | 1545052    |           5 |
       |                 41 | 1545054    |           5 |
       +--------------------+------------+-------------+
3 rows in set (0.00 sec)

```

Now, for a case, I want to subquery of them like this

```
mysql> SELECT
->  a.EIR_REF as EIR,
->
->  (SELECT NAMA FROM tb_customer_master c
->          WHERE a.COSTUMER_ID = c.COSTUMER_ID ) as "Name Of Customer",
->
->  (SELECT ATTENTION FROM tb_customer_master c
->          WHERE a.COSTUMER_ID = c.COSTUMER_ID ) as "ATTENTION"
->
-> FROM tb_master_repair_estimate a
->
-> WHERE a.EIR_REF = "1545052";
+------------+----------------------+-----------+
| EIR        | Name Of Customer     | ATTENTION |
+------------+----------------------+-----------+
| 1545052    | APL                  | Test      |
+------------+----------------------+-----------+
1 row in set (0.00 sec)

```

My question is, I want to make my last query to be simply. How can I make With a one column eir, name of customer, attention, in\_date, in\_ref and so on to be simply, not as select one by one in subquery. It is so long command if determine it one by one.
Any suggestion so appreciated

**UPDATE**,

Thanks for the quickly response. Ther reason why I am using subquery is because my table of report master have many foreign key.
This is the complete tbl\_report

```
mysql> select EIR_REF, NO_TANK, COSTUMER_ID, TANK_ID, TOTAL from   tb_master_repair_estimate where EIR_REF = "1545052";
+------------+---------+-------------+---------+-------+
| EIR_REF    | NO_TANK | COSTUMER_ID | TANK_ID | TOTAL |
+------------+---------+-------------+---------+-------+
| 1545052    |       7 |           5 |       1 |  NULL |
+------------+---------+-------------+---------+-------+

```

And another table again named `tb_tank_type`

```
mysql> select * from tb_tank_type;
+---------+-----------+------------+
| TANK_ID | NAMA_TYPE | KETERANGAN |
+---------+-----------+------------+
|       1 | IM04      | NULL       |
|       2 | XXXX      | NULL       |
+---------+-----------+------------+
2 rows in set (0.00 sec)

```

I am try to make them on one unite using my code like this:

```
mysql> SELECT
->  a.EIR_REF as EIR,
->
->  (SELECT NAMA_TYPE FROM tb_tank_type b
->     WHERE b.TANK_ID = a.TANK_ID) as "type tank",
->
->  (SELECT NAMA FROM tb_customer_master c
->          WHERE a.COSTUMER_ID = c.COSTUMER_ID ) as "Name Of Customer",
->
->  (SELECT ATTENTION FROM tb_customer_master c
->          WHERE a.COSTUMER_ID = c.COSTUMER_ID ) as "ATTENTION",
->
->  (SELECT PREFIX FROM tb_iso_tanks d
->          WHERE a.NO_TANK = d.ID_TANK)    as "PREFIX",
->
->  (SELECT SERIAL_NUMBER FROM tb_iso_tanks d
->          WHERE a.NO_TANK = d.ID_TANK)    as "SERIAL_NUMBER"
->
-> FROM tb_master_repair_estimate a
->
-> WHERE a.EIR_REF = "1545052";
+------------+-----------+----------------------+-----------+--------+---------------+
| EIR        | type tank | Name Of Customer     | ATTENTION | PREFIX | SERIAL_NUMBER |
+------------+-----------+----------------------+-----------+--------+---------------+
| 1545052    | IM04      | APL                  | Test      | EOLU   |       1234567 |
+------------+-----------+----------------------+-----------+--------+---------------+
1 row in set (0.00 sec)

```

Btw, thanks again.

So a case like this :
There are another table again.