I have multiple tables in my database. Each table contains the same columns. I have a column called "sic_code_description" which describes what type of business the record is. Dentist, Doctor, Lawyer ect..
I'm trying to count how many of these listings i have using multiple tables which ive broken down by county.
My SQL Code looks like this:
SELECT sic_code_description, COUNT(sic_code_description) AS
"Number of Records"
FROM hc_no_indv_docs_lawyers
GROUP BY sic_code_description
UNION SELECT sic_code_description, COUNT(sic_code_description) AS "Number of Records"
FROM pc_no_indv_docs_lawyers
GROUP BY sic_code_description;
it works but my results look like this:
Dentist 8
Dentist 10
Doctor 4
Doctor 6
i would like it to look like this:
Dentist 18
Doctor 10
Any advice?
Thanks.