"last patient in the active_patients table" LAST_INSERT_ID() not working

Hi!
I am doing this cumulative project and am asked to get “the last patient in the active_patients table” which is meant to be the last inserted.
Thus Dr. G offered me the function LAST_INSERT_ID() which I tried but whatever I do it does not work :frowning:

Of course there are other ways to get this last ID e.g. I might sort the ID in reverse order and limit to 1. But I think this method to be quite elegant.

Link: https://www.codecademy.com/paths/data-science/tracks/sql-intermediate/modules/dspath-sql-cumulative-project/projects/cadcademy-milestone

Thanks.

I don’t think there is anything wrong with this. I would say this is a fitting solution.

Thanks.
But any idea why the function LAST_INSERT_ID() does not work?
Cheers
Andreas