How to reach the second table from the first using SQL Query?
1st Table:
| Date | CurrencyID | Rate |
|---|---|---|
| 2022/01/01 | 1 | 1000 |
| 2022/01/01 | 2 | 2000 |
| 2022/01/02 | 1 | 1000 |
| 2022/01/02 | 2 | 2000 |
| 2022/01/03 | 1 | 1000 |
| 2022/01/03 | 2 | 2000 |
2nd Table:
| Date | Currency1 | Currency2 |
|---|---|---|
| 2022/01/01 | 1000 | 2000 |
| 2022/01/02 | 1000 | 2000 |
| 2022/01/03 | 1000 | 2000 |