title: Oracle spatial - get sdo_geometry information as an output of a select
body: <p>I have a table with point features in Oracle Spatial and I am trying to select distinct features by combining its name and date and counting its occurrences during a period.</p>
  
  <p>The problem is that I can't get the spatial information (<code>sdo_geometry</code> type) in the output. </p>
  
  <pre><code>select 
    a.feature_name,  
    count(distinct(a.feature_name||trunc(a.date,'DD'))) as number_of_days,  
    first(geometry) -- &lt; --- the problem is here!  
  from table a 
  where 
    a.date &gt;=to_date('01/01/2016 00:00:00', 'DD/MM/YYYY HH24:MI:SS') 
    and a.date&lt;to_date('02/01/2016 00:00:00', 'DD/MM/YYYY HH24:MI:SS') 
  group by a.feature_name;
  </code></pre>