title: how to handle subquery returning more than one value error?
body: <p>is there any other way to write this query so that it wont get the error?</p>
  
  <pre><code>select sum(Travelled_value) 
  from travel_table 
  where customer_id=(select distinct f.CUSTOMER_ID as agg 
                     from SEGMENT_table f 
                     JOIN bookin_table t 
                     ON f.CUSTOMER_ID=t.CUSTOMER_ID 
                     where t.booking_date BETWEEN sysdate 
                     AND sysdate+21 and f.type='NEW';)
  </code></pre>
  
  <p>here the three tables having customer_id as common.</p>