How to write union sql query using db_select() in drupal7 with these conditions

->limit(50)
->orderByHeader($header)
->addTag('node_access')

Comments

The UNION, of course, is the

The UNION, of course, is the sticker in this situation. I believe that this post best addresses the issue. Aside from that, I'm not sure how well supported the integration of the other parts will be.