add batch remove batch split batch show hidden batches hide batch
db<>fiddle
feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
3 rows affected
id discount offers
1 10 [{"type":"discount","percent":100},{"type":"freebie","id":100}]
2 0 [{"type":"discount","percent":100},{"type":"freebie","id":100}]
2 100 null
ERROR:  operator does not exist: json @> json
LINE 4:   and offers @> '[{"type":"discount"}]'::json;
                     ^
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.

id discount offers
1 10 [{"type":"discount","percent":100},{"type":"freebie","id":100}]