title: How Do I Combine Multiple SQL Queries?
body: <p>I'm having some trouble figuring out any way to combine two SQL queries into a single one that expresses some greater idea.</p>
  
  <p>For example, let's say that I have query A, and query B. Query A returns the total number of hours worked. Query B returns the total number of hours that were available for workers to work. Each one of these queries returns a single column with a single row.</p>
  
  <p>What I really want, though, is essentially query A over query B. I want to know the percentage of capacity that was worked.</p>
  
  <p>I know how to write query A and B independently, but my problem comes when I try to figure out how to use those prewritten queries to come up with a new SQL query that uses them together. I know that, on a higher level, like say in a report, I could just call both queries and then divide them, but I'd rather encompass it all into a single SQL query.</p>
  
  <p>What I'm looking for is a general idea on how to combine these queries using SQL.</p>
  
  <p>Thanks!</p>