How to select records that meets specific criteria
To solve this problem, I did the following:

Created table and data:

CREATE TABLE table1
(
  id INTEGER NOT NULL,
  stage VARCHAR (10),
  nextstage VARCHAR (10),
  value1 INTEGER
);

INSERT INTO table1 
VALUES
(1, 'prospect', 'qualify' , 200),
(1, 'solution', 'develop' , 200),
(1, 'prospect',  NULL     , 200),
(2, 'prospect', 'qualify' , 100),
(2, 'develop' , 'solution', 200),
(2, 'prospect', 'qualify' , 100);


Then ran the following query:

SELECT id, timeP2Q FROM
(
  SELECT
    id,
    SUM
    (
      CASE 
        WHEN stage = 'prospect' and nextstage = 'qualify'  THEN value1 END
    ) AS timeP2Q
  FROM table1
  WHERE id NOT IN
  (
    SELECT id 
    FROM table1
    WHERE stage = 'prospect' AND nextstage IS NULL
  )
  GROUP BY id
) AS stuff  -- subqueries require an alias, not used.
ORDER BY id;


Which gives the desired result:

 id | timep2q 
----+---------
  2 |     200
(1 row)


The main query simply does the sum by id, and then the WHERE id NOT IN removes the unwanted ones. I think that there should be a date or a timestamp in there somewhere to be able to better extract information from this data! I see this as a process with stages?