@@ -1133,26 +1133,10 @@ select * from decode_view order by region, country_code;
(5 rows)
--
begin;
create table office2
(
locid integer,
bus_name text,
country_code char(2)
);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'locid' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
insert into office2(locid, bus_name, country_code) values
(1000, 'Test Solutions', 'CN'),
(1011, 'Taing Consulting', 'US'),
(2000, 'Parts Plus', 'IT'),
(1055, 'Computers Unlimited', 'IL'),
(2005, 'Kangaroos Inc.', 'AU');
commit;
select locid,
bus_name,
country_code
from office2
from locations
where decode(country_code, 'US', 'Americas', 'CA', 'Americas', 'MX', 'Americas',