add remove language chart show hidden hide
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
CREATE TABLE
CREATE TABLE
INSERT 0 3
INSERT 0 4
INSERT 0 4
id customer quarter amount
1 John Q1 10
2 John Q1 null
2 John Q2 null
1 John Q2 null
1 John Q3 null
2 John Q3 10
1 John Q4 null
2 John Q4 null
4 Kathy Q1 10
4 Kathy Q2 null
4 Kathy Q3 null
4 Kathy Q4 null
3 Mary Q1 null
3 Mary Q2 10
3 Mary Q3 null
3 Mary Q4 null
SELECT 16
id customer quarter amount
1 John Q1 10
2 John Q1 null
2 John Q2 null
1 John Q2 null
1 John Q3 null
2 John Q3 10
1 John Q4 null
2 John Q4 null
4 Kathy Q1 10
4 Kathy Q2 null
4 Kathy Q3 null
4 Kathy Q4 null
3 Mary Q1 null
3 Mary Q2 10
3 Mary Q3 null
3 Mary Q4 null
SELECT 16