title: How to get the count of records returned by teradata sql griup by query
body: <p>I have a condition where I need to check number of rows returned by select query in Teradata.</p>
  
  <p>My query looks like below </p>
  
  <pre><code>select 
  PDate ,Risk ,BName ,BNumber ,
  ONumber ,OnNumber ,ID_CD ,Entity ,
  AU ,RType, count (*) 
  from Load_one.import_test
  group by 1,2,3,4,5,6,7,8,9,10
  having count (*) &gt; 1;
  </code></pre>
  
  <p>So I would like to know the count of rows it returns. I tried something like below</p>
  
  <pre><code>Select Count(*)
  From    ( select 
  PDate ,Risk ,BName ,BNumber ,
  ONumber ,OnNumber ,ID_CD ,Entity ,
  AU ,RType, count (*) 
  from Load_one.import_test
  group by 1,2,3,4,5,6,7,8,9,10
  having count (*) &gt; 1;
  )  as temp
  </code></pre>
  
  <p>It returning an error: select failed 3707 expected something like an 'EXCEPT' keyword or an 'UNION' keyword or a 'MINUS' keyword between an integer and ;</p>
  
  <p>Please help me.</p>