title: List order numbers of the orders that included at least three diﬀerent parts (not quantity). Display the number of parts ordered as well?
body: <p>I want to query a mailorder database and following is the information which I want to fetch</p>
  
  <p>List order numbers of the orders that included at least three diﬀerent parts (not quantity). Display the number of parts ordered as well?
  I used the below query but its only returning the first entry</p>
  
  <pre><code>select o.ono, od.pno 
  from orders o, odetails od, parts p 
  where o.ono = od.ono and od.pno = p.pno 
  having count(od.pno) &gt; 2
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/cdAjB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cdAjB.png" alt="enter image description here"></a></p>