I'm having a issue with a query in Postgres. I need to extract from a table with a specific pattern using a pure select. For example I have:
| Column A | Column B | Column C | Column D |
|---|---|---|---|
| 1 | 2 | 3 | 4 |
From this table I want to select something like this:
| Column A | Column B | Column C | Column D |
|---|---|---|---|
| 1 | null | null | null |
| 1 | 2 | null | null |
| 1 | 2 | 3 | null |
| 1 | 2 | 3 | 4 |
I don't really have a clue on how to do it efficiently. Anyone can help? Many thanks