title: oracle display customer who purchased most cars WITHOUT analytic functions
body: <p>I'm currently trying to answer the following question:</p>
  
  <p>Display the name of the customer who has purchased the most cars from Archie’s Luxury Motors.</p>
  
  <p>Tables I'm working with:</p>
  
  <p><strong>Customer</strong> </p>
  
  <pre><code>(custID, name, DOB, streetAddress, suburb, postcode,
  gender, phoneNo, email, type)
  </code></pre>
  
  <p><strong>SalesTransaction</strong> </p>
  
  <pre><code>(VIN, custID, agentID, dateOfSale, agreedPrice)
  </code></pre>
  
  <h2>My query</h2>
  
  <pre><code>select * 
  from (
  select customer.name
  from customer, salestransaction
  where customer.custID = salestransaction.custID
  group by (customer.name), salestransaction.custID
  order by count(*) desc
  )
  where rownum=1;
  </code></pre>
  
  <p>Now I've found out that I cannot use analytic functions (rownum &amp; rank)</p>
  
  <p>How would I go about doing this with using pure transactional SQL only?</p>