Updating countries

Going through the company data, you notice there are some inconsistencies in the store addresses. These probably occurred during data entry, where people fill in fields using different naming conventions. This can be especially seen in the country field, and you decide that countries should be represented by their abbreviations. The only countries in the database are Canada and the United States, which should be represented as USA and CA.

In this exercise, you will compare the records that need to be updated in order to do this task on the star and snowflake schema. dim_store_star and dim_country_sf have been loaded.

This exercise is part of the course

Database Design

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

-- Output records that need to be updated in the star schema
SELECT * FROM ___
WHERE ___ != 'USA' AND ___ !='CA';