title: python sqlalchemy union query，'Query' object has no attribute 'spends'
body: <pre><code>#app adset
  app_list = db.session.query(
      AdsetAppReport.adset_id.label("adset_id"),
      func.sum(AdsetAppReport.spend).label("spends"),
      ).group_by(AdsetAppReport.adset_id)
  
  #web adset
  web_list = db.session.query(
      AdsetReport.adset_id.label("adset_id"),
      func.sum(AdsetReport.spend).label("spends"),
      ).group_by(AdsetReport.adset_id)
  
  #union two tables
  both_list = app_list.union(web_list)
  
  #Query
  adset_list = db.session.query(
      Adset.adset_id,
      Adset.user_os,
      both_list.spends,
      ).filter(both_list.adset_id == Adset.adset_id) \
       .all()
  </code></pre>
  
  <p>I want to merge two table as both_list, then make the adset inner join in the temporary table.
  when i run the code, but it show me AttributeError.
  AttributeError: both_list 'Query' object has no attribute 'spends'</p>