I have the following sql queries. How can I write 1 query so it returns only one result set?
select distinct fdShortNumber as PartNumber, count(fdShortNumber) as Quantity
from tbStation5
where fdAssemblyDate = @fdAssemblyDate AND fdAssemblyShift = @fdAssemblyShift
group by fdShortNumber
select distinct fdShortNumber as PartNumber, count(fdShortNumber) as Quantity
from [Production1].dbo.tbStation7
where fdAssemblyDate = @fdAssemblyDate AND fdAssemblyShift = @fdAssemblyShift
group by fdShortNumber
select distinct fdShortNumber as PartNumber, count(fdShortNumber) as Quantity
from tbStation5
where fdAssemblyDate = @fdAssemblyDate AND fdAssemblyShift = @fdAssemblyShift
group by fdShortNumber
select distinct fdShortNumber as PartNumber, count(fdShortNumber) as Quantity
from [Production1].dbo.tbStation7
where fdAssemblyDate = @fdAssemblyDate AND fdAssemblyShift = @fdAssemblyShift
group by fdShortNumber