add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
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?.
CREATE TABLE
INSERT 0 9
student subject grade
Alice Geography 4
Alice History 4.5
Alice Math 4
Bob Geography 3
Bob History 3
Bob Math 3.5
Charlie Geography 4.5
Charlie History 4
Charlie Math 3
SELECT 9
student geography history math
Alice 4 4.5 4
Bob 3 3 3.5
Charlie 4.5 4 3
SELECT 3
student name value
Alice subject Geography
Alice grade 4
Alice subject History
Alice grade 4.5
Alice subject Math
Alice grade 4
Bob subject Geography
Bob grade 3
Bob subject History
Bob grade 3
Bob subject Math
Bob grade 3.5
Charlie subject Geography
Charlie grade 4.5
Charlie subject History
Charlie grade 4
Charlie subject Math
Charlie grade 3
SELECT 18