title: SQL query two tables with relation one-to-many
body: <p>I have two tables A and Band the relation between A to B is A--->one-to-Many--->B</p>
  
  <p>Normally i have one record of B for every record of A. </p>
  
  <p>I am trying to write a query which would give me list of <strong>ONLY</strong> records of A which have more than <strong>ONE(MULTIPLE) record(s)</strong> in B. </p>
  
  <p>I am very confused as I have only done basic sql queries and this one seems complex to me.</p>
  
  <p>Could some one please guide me to correct answer or give me the solution.</p>
  
  <p>edited:</p>
  
  <p>ok i tried something like below and it gave me an error</p>
  
  <p>SELECT SOME_COLUMN_NAME FROM A a, B b WHERE a.ID=b.ID and count(b.SOME_OTHER_COLUMN_NAME)>1;</p>
  
  <p>ORA-00934: group function is not allowed here</p>
  
  <p>I tried to search on the internet ad i am not allowed to use grouping in where clause and should go by using having. I am stuck here now.</p>