Exercise · SQL & Querying
Predict, then run it
Predict the output
feed(otter, kind, g) = (o1,fish,10),(o1,crab,5). Fish grams per otter, the FILTER spelling:
SELECT otter, SUM(g) FILTER (WHERE kind = 'fish') AS fish FROM feed GROUP BY otter;
Predict the exact output.