Changed variable name from demand to flow to match the Oracle schema