I have table **tansactions** that looks like this -
[![enter image description here](https://i.stack.imgur.com/MDntI.jpg)](https://i.stack.imgur.com/MDntI.jpg)

I want to make a separate **customers** table that has distinct 'customer\_code' in ascending order and related 'market\_code','market\_name', and 'zone' columns.
the resultant table would look like this -
[![enter image description here](https://i.stack.imgur.com/zEiQH.png)](https://i.stack.imgur.com/zEiQH.png)

I have tried -

```
create table customers as (
select customer_code, market_code, market_name, zone 
from transactions group by customer_code);

```

This works fine on MySQL workbench but doesn't work on PGadmin.

[![enter image description here](https://i.stack.imgur.com/PiYjV.jpg)](https://i.stack.imgur.com/PiYjV.jpg)