By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
12 rows affected
p | q | r |
---|---|---|
1 | A | 甲 |
2 | A | 丙 |
3 | D | 甲 |
4 | C | 丙 |
5 | X | 乙 |
6 | A | 甲 |
7 | D | 甲 |
8 | C | 乙 |
9 | X | 甲 |
10 | D | null |
11 | C | 乙 |
12 | C | 乙 |
4 rows affected
s | t |
---|---|
ㄅ | A |
ㄅ | D |
ㄆ | C |
ㄇ | X |
部門 | 等級 | 數量 | 百分比 |
---|---|---|---|
ㄅ | 甲 | 4 | 80% |
ㄇ | 甲 | 1 | 20% |
ㄆ | 乙 | 3 | 75% |
ㄇ | 乙 | 1 | 25% |
ㄅ | 丙 | 1 | 50% |
ㄆ | 丙 | 1 | 50% |