 <pre><code>SELECT ca.CustomerName AS [Affected Users] FROM CustomerActivity ca INNER JOIN ShipperActivity sa ON ca.OrderNumber = sa.OrderNumber WHERE sa.ActivityDate &gt;= '2012-02-15 00:00:00' AND sa.ActivityDate &lt; '2012-02-16 00:00:00' UNION SELECT ea.EmployeeName AS [Affected Users] FROM EmployeeActivity ea INNER JOIN ShipperActivity sa ON ea.OrderNumber = sa.OrderNumber WHERE sa.ActivityDate &gt;= '2012-02-15 00:00:00' AND sa.ActivityDate &lt; '2012-02-16 00:00:00' </code></pre>