CREATE OR REPLACE VIEW core.county_sales_tax_scrud_view
AS
SELECT county_sales_taxes.county_sales_tax_id,
county_sales_taxes.county_sales_tax_code,
county_sales_taxes.county_sales_tax_name,
((counties.county_code::text || '('::text) || counties.county_name::text) || ')'::text AS county,
entities.entity_name,
industries.industry_name,
((item_groups.item_group_code::text || '('::text) || item_groups.item_group_name::text) || ')'::text AS item_group,
county_sales_taxes.rate
FROM core.county_sales_taxes
LEFT JOIN core.counties ON county_sales_taxes.county_id = counties.county_id
LEFT JOIN core.entities ON county_sales_taxes.entity_id = entities.entity_id
LEFT JOIN core.industries ON county_sales_taxes.industry_id = industries.industry_id
LEFT JOIN core.item_groups ON county_sales_taxes.item_group_id = item_groups.item_group_id;