Hi,
Create table tbl_charges
(
center int,
fe_currency varchar2(5),
front_end_chg number,
be_currency varchar2(5),
backend_chg number
);
insert into tbl_charges value (123,'USD', 1.25, 'SGD', 5);
insert into tbl_charges value (123,'USD', 1.25, 'USD', 5);
insert into tbl_charges value (123,'USD', 1.25, 'SGD', 5);
insert into tbl_charges value (123,'PHP', 1.25, 'USD', 5);
insert into tbl_charges value (123,'USD', 1.25, 'YEN', 5);
insert into tbl_charges value (456,'WON', 1.25, 'YEN', 5);
insert into tbl_charges value (456,'USD', 1.25, 'USD', 5);
insert into tbl_charges value (456,'USD', 1.25, 'SGD', 5);
insert into tbl_charges value (911,'PHP', 1.25, 'USD', 5);
insert into tbl_charges value (911,'USD', 1.25, 'YEN', 5);
insert into tbl_charges value (911,'WON', 1.25, 'USD', 5);
So I have a table named tbl_charges as seen in the table below and it has columns center, fe_currency, front_end_chg, be_currency, and backend_chg. And I wanted to order the data by center, fe_currency, and be_currency. Is it possible to order the data by center and fe_currency and center and be_currency without affecting the order of the fe_currency? See sample table below for my expected output.
SAMPLE TABLE:
CENTER
| FE_CURRENCY | FRONT_ENT_CHG | BE_CURRENCY | BACKEND_CHG |
|---|
| 123 | USD | 1.25 | SGD | 5 |
| 123 | USD | 1.25 | USD | 5 |
| 123 | USD | 1.25 | SGD | 5 |
| 123 | PHP | 1.25 | USD | 5 |
| 123 | USD | 1.25 | YEN | 5 |
| 456 | WON | 1.25 | YEN | 5 |
| 456 | USD | 1.25 | USD | 5 |
| 456 | USD | 1.25 | SGD | 5 |
| 911 | PHP | 1.25 | USD | 5 |
| 911 | USD | 1.25 | YEN | 5 |
| 911 | WON | 1.25 | USD | 5 |
EXPECTED OUTPUT
| CENTER | FE_CURRENCY | FRONT_ENT_CHG | BE_CURRENCY | BACKEND_CHG |
|---|
| 123 | PHP | 1.25 | SGD | 5 |
| 123 | USD | 1.25 | SGD | 5 |
| 123 | USD | 1.25 | USD | 5 |
| 123 | USD | 1.25 | USD | 5 |
| 123 | USD | 1.25 | YEN | 5 |
| 456 | USD | 1.25 | SGD | 5 |
| 456 | USD | 1.25 | USD | 5 |
| 465 | WON | 1.25 | YEN | 5 |
| 911 | PHP | 1.25 | USD | 5 |
| 911 | USD | 1.25 | USD | 5 |
| 911 | WON | 1.25 | YEN | 5 |
I appreciate the effort and help. Thank you!