Guidewire PolicyCenter implementation teams need an inventory summary for configuration assets. Write a PostgreSQL query that reports the total quantity of active inventory records for every inventory type, including types with no active records.
Requirements
- Join
inventory_types to inventory_items using the inventory type identifier.
- Include only items where
status = 'active', while retaining inventory types with no matching active items.
- Sum
quantity by inventory type and return 0 when no active quantity exists. PostgreSQL SUM should naturally ignore a NULL quantity.
- Sort the output alphabetically by inventory type name.