Hi i have these queries that each count an item. Is it possible to combine these into one query that counts the items? Instead of having 6 different queries?
<cfquery name="get_data_info_1" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Shipped to wrong location'
</cfquery>
<cfquery name="get_data_info_2" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Received damaged'
</cfquery>
<cfquery name="get_data_info_3" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Received item late'
</cfquery>
<cfquery name="get_data_info_4" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Received wrong parts'
</cfquery>
<cfquery name="get_data_info_5" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Parts manufactured wrong'
</cfquery>
<cfquery name="get_data_info_6" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Other'
</cfquery>
<cfquery name="get_data_info_1" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Shipped to wrong location'
</cfquery>
<cfquery name="get_data_info_2" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Received damaged'
</cfquery>
<cfquery name="get_data_info_3" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Received item late'
</cfquery>
<cfquery name="get_data_info_4" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Received wrong parts'
</cfquery>
<cfquery name="get_data_info_5" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Parts manufactured wrong'
</cfquery>
<cfquery name="get_data_info_6" datasource="mp2">
SELECT count(error) as error_count
from vendor_issue
where error = 'Other'
</cfquery>