If you write the trigger without the unnecessary convoluted crappola, what happens? ``` CREATE TRIGGER InsertfehlerPruefung BEFORE INSERT ON Pruefung BEGIN SELECT RAISE(ABORT, 'not enough Fahrstundenminuten') WHERE NEW.theorie == 0 AND ( SELECT SUM(dauer) FROM fahrstunde WHERE fahrstunde.schueleremail == NEW.email ) >= 180; END; ``` I don't speak whatever language those variables are in but I suspect that your >= comparison is wrong-about. I therefore suspect that your whole logic is broken and I would only comment that convoluted thinking and complication for complication sake does not usually result in what was intended. In other words, embrace the KISS principle!