Posted By

on 06/20/09


Tagged


Versions (?)

GROUP BY en un UNION


 / Published in: SQL
 

URL: http://bytes.com/topic/sql-server/answers/685576-use-count-group-union#post2727770

  1. SELECT x.issue, count(x.issue)
  2. FROM (
  3. SELECT issue FROM mytable1
  4. union ALL
  5. SELECT issue FROM mytable2
  6. union ALL
  7. SELECT issue FROM mytable3
  8. ) AS x
  9. GROUP BY x.issue

Report this snippet  

You need to login to post a comment.