Hay un error: ERROR: column "lluvias" does not exist LINE 25: WHERE n.idnota =lluvias ^