sql to show recent intentions