title: How do you perform multiple queries?
body: <p>I am trying to perform multiple subsequent queries based upon arguments in my function.  I can't quite figure out the syntax.</p>
  
  <pre><code>let returnVideoInfo catId isFeatured
  
      // main query
      let vidQuery = query{
          for row in db.Movies do
          where(row.IsFeatured = isFeatured)
          select row
      }    
  
      // I want to apply filters here based upon if arguments are null or not
      vidQuery
      |&gt;
      (fun x -&gt; 
      if catId &lt;&gt; null then
          Seq.filter (fun x -&gt; x.CategoryId = catId) x
      else
      x)
  </code></pre>
  
  <p>This obviously doesn't work at all, so how can I fix this?</p>