SQL cut results from table
I have the following query:

        SELECT cust_id,cust_name,SUM(calls.duration) as duration
      FROM 
    	  calls, telephone
      
      WHERE calls.from_t_no = telephone.t_no
      AND
      calls.duration <=60
      
      group by telephone.cust_id, telephone.cust_name

Which give the following results;

    cust_id	cust_name duration
    0123456789	Avi	18
    1234567890	Benny	27
    2345678901	Gadi	13
    3456789012	Dalia	69
    4567890123	Hilla	5
    5678901234	Varda	14
    7890123456	Haim	20
    8901234567	Tali	20
    9012345678	Yoram	46


I also have this query:

    SELECT cust_id,cust_name,SUM(calls.duration) as duration 
    	  FROM calls ,telephone
    	  WHERE to_t_no = telephone.t_no
    	  AND
    	  calls.duration >=500
    	  group by telephone.cust_id, telephone.cust_name

Which provides the following results:

    cust_id	cust_name	duration
    2345678901	Gadi	50022
    4567890123	Hilla	50000


the second query is actually another filter or condition which the first query should match.
I cannot include the second query within the first query because it uses different columns.
I need to "subtract" the second query from the first query.

How do I do that?
SQL cut results from table
===

I have the following query:

        SELECT cust_id,cust_name,SUM(calls.duration) as duration
      FROM 
    	  calls, telephone
      
      WHERE calls.from_t_no = telephone.t_no
      AND
      calls.duration <=60
      
      group by telephone.cust_id, telephone.cust_name

Which give the following results;

    cust_id	cust_name duration
    0123456789	Avi	18
    1234567890	Benny	27
    2345678901	Gadi	13
    3456789012	Dalia	69
    4567890123	Hilla	5
    5678901234	Varda	14
    7890123456	Haim	20
    8901234567	Tali	20
    9012345678	Yoram	46


I also have this query:

    SELECT cust_id,cust_name,SUM(calls.duration) as duration 
    	  FROM calls ,telephone
    	  WHERE to_t_no = telephone.t_no
    	  AND
    	  calls.duration >=500
    	  group by telephone.cust_id, telephone.cust_name

Which provides the following results:

    cust_id	cust_name	duration
    2345678901	Gadi	50022
    4567890123	Hilla	50000


the second query is actually another filter or condition which the first query should match.
I cannot include the second query within the first query because it uses different columns.
I need to "subtract" the second query from the first query.

How do I do that?