How many budget record has a budget amount smaller than the invested amount?
SELECT count(*) FROM budget WHERE budgeted  <  invested
budget record has a budget amount smaller than the invested amount refers to COUNT(WHERE budgeted < invested);