title: what is best practice to return single value data with record set of data
body: <p>I am obtaining some single value data like</p>
  
  <pre><code> Number Users in system
   Number of Books in system
   Number books checked out by a particular user
  </code></pre>
  
  <p>Then for any user, I will also need to return a record set:</p>
  
  <pre><code> ISBN of each book checked out for a month
  </code></pre>
  
  <p>In other words this is what I want to receive back</p>
  
  <pre><code> 26  ( number users in system )
   256 ( number books in system )
   19  ( books checked out by user )
   12345454, 1235544, 1243433, 1345993, 3349934  ( List of ISBNs for user for month )
  </code></pre>
  
  <p>What is the best practice to return the above data to a client application?</p>
  
  <p>A little more clarification, what SQL statement would return this information?</p>
  
  <p>I got the "Select ISBN from Records where user = 'user'  -- that one I get.. the other values are what are throwing me...?  Is it as simple as "select count(*) from users" for number of users? (etc)</p>
  
  <p>in other words, would the stored proc be something like this:</p>
  
  <pre><code> Select count(*) from users
   Select count(*) from books
   Select count(*) from checkouts where user = 'user'
   Select ISBN from Records where user = 'user'  
  </code></pre>
  
  <p>Is this the type of stored procedure that I need to write?</p>
  
  <p>Thanks</p>