title: manipulating a query
body: <p>how can i retrieve the first 10 rows of the firstnames (which is <code>prepodFamIO</code> ) found in the prepod table and the sum of the hours in a semester which is greatest the hours are found in plany table(which is <code>PAuditTime</code> ,given that the two information are in different tables.</p>
  
  <p>i know if i want to select the first 10 rows of the first names i can run this query</p>
  
  <pre><code>select * from prepod 
  limit 30;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>select * from prepod 
  where rownum &lt;= 30;
  </code></pre>
  
  <p>and if i want to select the sum of hours which is greatest</p>
  
  <pre><code>SELECT MAX(PAuditTime)
   AS LargestNumber
   FROM plany
   order by PAuditTime;
  </code></pre>
  
  <p>but how can i put them in one query ....i am using sql in access and ms sql thanks
  this is a snapshot of my database but im only interested in tables plany and prepod
  <img src="https://i.stack.imgur.com/pZmUv.png" alt="enter image description here"></p>