Exercise · SQL & Querying
Predict, then run it
Predict the output
boxes(box, ings) = (b1,[rice,nut]),(b2,[rice,NULL]). Boxes provably safe for a nut allergy — a NULL (unlabeled) ingredient isn't safe:
SELECT box FROM boxes WHERE NOT list_contains(ings, 'nut') AND NOT list_contains(ings, NULL) ORDER BY box;
Predict the exact output.