title: how to select from query result in Firebird 1.5
body: <p>i got this query for Firebird 1.5 :</p>
  
  <pre><code>select * from (
  select
  ddddd.name,
  gggg.land,
  dd.maskenkey,
  ddd.name,
  Sum(b.epreis*a.menge),  
  Sum((kx.epreis / lx.kurs) * a.menge),
  sum(case when b.bverpa_id='1' then (a.menge*e.p_volume)/e.pcs_box else a.menge*e.P_PCS_20ST end) as jumlah 
  from brrcp a  
  left outer join baufpo b on a.baufpo_id_aufnrpos = b.id 
  left outer join brrc c on a.brrc_id_rgnr = c.id  
  left outer join bauf d on b.bauf_id_linkkey = d.id 
  left outer join bkunde dd on d.bkunde_id_kunr = dd.id  
  left outer join badr ddd on dd.badr_id_adrnr = ddd.id 
  left outer join bvert dddd on d.bvert_id = dddd.id  
  left outer join badr ddddd on dddd.badr_id = ddddd.id 
  left outer join bbesp kx on b.id = kx.baufpo_id_aufpos  
  left outer join bbes aa on kx.bbes_id_linkkey = aa.id 
  left outer join bsal yy on kx.bsal_id = yy.id  
  left outer join bwaer lx on kx.bwaer_id_waehrungk = lx.id  
  left outer join bplz zz on ddd.bplz_id_landplz = zz.id 
  left outer join bland gggg on zz.bland_id_landkennz = gggg.id 
  left outer join bsa e on a.bsa_id_artnr = e.id  
  where c.eta_shipment between '01/01/2015' and '6/30/2015'
  and dd.maskenkey starting 'AS-' and d.cancel = 'N' and d.confirm = 'N' and aa.status_po &lt;&gt; 'C'  
  and d.auftrag = 'J' and a.rg_buchungsart Is Null
  group by ddddd.name,gggg.land,dd.maskenkey,ddd.name) abc
  </code></pre>
  
  <p>How to fix its structure because when I want to execute this query, i will get error? Thank you !! </p>
  
  <pre><code>**Invalid token.
  Dynamic SQL Error.
  SQL error code = -104.
  Token unknown - line 2, char 1.
  select.**
  </code></pre>