I have the following SQL in a Total Query that shows me the total Faults by category and also gives me a total number of Work Units. Currently there are Five Faults and it also shows me there are Five Work Units. In reality there are only Three unique Work Units even though there are Five Faults. How can I modify the code below to give the Total of Unique Work Units instead of counting each Work Unit for each Fault?
Code:
Select FaultCategory, Count(*) As [Faults/NoFaults]
From WorkUnitsFaultsMainTBL
Where [TodaysDate] Between [Forms]![WorkUnitsFaultsMainFRM]![StartDateTxt] And [Forms]![WorkUnitsFaultsMainFRM]![EndDateTxt]
Group By FaultCategory
UNION ALL Select 'Total Work Units', Count(*)
From WorkUnitsFaultsMainTBL
Where [TodaysDate] Between [Forms]![WorkUnitsFaultsMainFRM]![StartDateTxt] And [Forms]![WorkUnitsFaultsMainFRM]![EndDateTxt];