blob: 6e53d01b17363d5ace908b4fa1ff33bbbbb3e281 [file] [log] [blame]
buyingyic73348c2012-11-02 00:31:31 +00001DROP TABLE IF EXISTS nation;
2DROP TABLE IF EXISTS u1_gby;
3
4-- create tables and load data
5create external table nation (N_NATIONKEY INT, N_NAME STRING, N_REGIONKEY INT, N_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/nation';
6create table u1_gby(col1 INT, col2 INT);
7
8insert overwrite table u1_gby select N_REGIONKEY, count(1)
9from nation
10group by N_REGIONKEY
11order by N_REGIONKEY;