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?.
6 rows affected
merchant_id product_id store_id product_status product_state
3 3828 store_b old_product both
4 3828 store_a old_product both
1 8328 store_a new_product store_a only
2 8328 store_a new_product store_a only
2 9392 store_b new_product store_b only
3 9392 store_b new_product store_b only
merchant_id product_status product_state cnt
1 new_product store_a only 1
2 new_product store_a only 1
2 new_product store_b only 1
3 new_product store_b only 1
3 old_product both 1
4 old_product both 1