Which dish lasted longer, Anchovies or Fresh lobsters in every style?
if (SUBTRACT(last_appeared, first_appeared) WHERE name = 'Anchovies') > (SUBTRACT(last_appeared, first_appeared) WHERE name = 'Fresh lobsters in every style'), it means 'Anchovies' lasted longer; if (SUBTRACT(last_appeared , first_appeared) WHERE name = 'Fresh lobsters in every style') > (SUBTRACT(last_appeared , first_appeared) WHERE name = 'Anchovies') it means 'Fresh lobsters in every style' last longer;
SELECT CASE WHEN SUM(CASE WHEN name = 'Anchovies' THEN last_appeared - first_appeared ELSE 0 END) - SUM(CASE WHEN name = 'Fresh lobsters in every style' THEN last_appeared - first_appeared ELSE 0 END) > 0 THEN 'Anchovies' ELSE 'Fresh lobsters in every style' END FROM Dish WHERE name IN ('Fresh lobsters in every style', 'Anchovies')