Professional Documents
Culture Documents
le orders_ppi_m;
24
1
SHOW
Teradata
Students
00:00:00
00:00:00
111
4/18/2011 15:37:29
TFClass 00:00:00
120
select p
artition, count(*)from orders_ppi_mwhere o_orderdate between '2001-01-01' and '2
010-12-31'group by 1order by 1; 127
1
SELECT Teradata
Students
00:00:00
00:00:00
110
4/18/2011 15:37:07
TFClass 00:00:00
6000
insert i
nto orders_ppi_m select* from orders_2010;
50
1
INSERT Teradata
Students
00:00:00
00:00:00
109
4/18/2011 15:30:40
TFClass 00:00:00
12
select p
artition, count(*)from orders_ppi_mwhere o_orderdate between '2001-01-01' and '2
001-12-31'group by 1order by 1; 127
1
SELECT Teradata
Students
00:00:00
00:00:00
107
4/18/2011 15:29:58
TFClass 00:00:00
0
3706
select p
artition count(*)from orders_ppi_mwhere o_orderdate between '2001-01-01' and '20
01-12-31'group by 1order by 1; 126
1
SELECT Teradata
Students
00:00:00
00:00:00
106
4/18/2011 15:26:58
TFClass 00:00:00
1
select c
ount(*) from orders_ppi_m;/*select count (*) from orders_2010;*/
74
2
SELECT Teradata
Students
00:00:00
00:00:00
105
4/18/2011 15:26:33
TFClass 00:00:00
20400
insert i
nto orders_ppi_m select* from orders; 45
1
INSERT Teradata
Students
00:00:00
00:00:00
104
4/18/2011 15:24:37
TFClass 00:00:00
0
/*show t
able orders;*/CREATE SET TABLE STUDENTS.orders_ppi_m ,FALLBACK ,
NO BEFORE J
OURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
o_orderid INTEGE
R NOT NULL,
o_custid INTEGER NOT NULL,
o_orderstatus CHAR(1) CHARACTER
SET LATIN CASESPECIFIC,
o_totalprice DECIMAL(9,2) NOT NULL,
o_orderda
te DATE FORMAT 'YYYY-MM-DD' NOT NULL,
o_orderpriority SMALLINT,
o_cler
k CHAR(16) CHARACTER SET LATIN NOT CASESPECIFIC,
o_location SMALLINT,
o_shippriority SMALLINT,
o_comment VARCHAR(79) CHARACTER SET LATIN NOT CASE
SPECIFIC)PRIMARY INDEX ( o_orderid )partition by (range_n(o_orderdate between da
te '2001-01-01' and date '2010-12-31' each interval '1' month));
748
1
CREATE TABLE
Teradata
Students
00:00:00
00:00:00
103
4/18/2011 15:24:08
TFClass 00:00:00
0
3707
/*show t
able orders;*/CREATE SET TABLE STUDENTS.orders_ppi_m ,FALLBACK ,
NO BEFORE J
OURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
o_orderid INTEGE
R NOT NULL,
o_custid INTEGER NOT NULL,
o_orderstatus CHAR(1) CHARACTER
SET LATIN CASESPECIFIC,
o_totalprice DECIMAL(9,2) NOT NULL,
o_orderda
te DATE FORMAT 'YYYY-MM-DD' NOT NULL,
o_orderpriority SMALLINT,
o_cler
k CHAR(16) CHARACTER SET LATIN NOT CASESPECIFIC,
o_location SMALLINT,
o_shippriority SMALLINT,
o_comment VARCHAR(79) CHARACTER SET LATIN NOT CASE
SPECIFIC)PRIMARY INDEX ( o_orderid )partition by (range_n(o_orderdate between da
te '2001-01-01' and date '2010-12-31' each interval '1' month); 747
1
CREATE TABLE
Teradata
Students
00:00:00
00:00:00
102
4/18/2011 15:22:58
TFClass 00:00:00
0
3707
/*show t
able orders;*/CREATE SET TABLE STUDENTS.orders_ppi_m ,FALLBACK ,
NO BEFORE J
OURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
o_orderid INTEGE
R NOT NULL,
o_custid INTEGER NOT NULL,
o_orderstatus CHAR(1) CHARACTER
SET LATIN CASESPECIFIC,
o_totalprice DECIMAL(9,2) NOT NULL,
o_orderda
te DATE FORMAT 'YYYY-MM-DD' NOT NULL,
o_orderpriority SMALLINT,
o_cler
k CHAR(16) CHARACTER SET LATIN NOT CASESPECIFIC,
o_location SMALLINT,
o_shippriority SMALLINT,
o_comment VARCHAR(79) CHARACTER SET LATIN NOT CASE
SPECIFIC)PRIMARY INDEX ( o_orderid )partition by (range_n(o_orderdate between da
te '2001-01-01' and date '2010-12-31' each interval '1' month); /*select count(*
)from orders;select partition,count(*)from ordersgroup by 1order by 1;select par
tition,count(*)from orderswhere o_orderdate between '2001-01-01' and '2001-12-31
4/18/2011 11:44:57
TFClass 00:00:00
0
3706
select c
ount(*)/count(distinct)Dept_Number))from employee;
60
1
SELECT
Teradata
Students
00:00:00
00:00:00
64
4/18/2011 11:44:44
TFClass 00:00:00
0
3706
select c
ount(*)/count(distinct)Dept_Number)from employee;
59
1
SELECT
Teradata
Students
00:00:00
00:00:00
62
4/18/2011 11:44:34
TFClass 00:00:00
0
3706
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*//*select Last_Name,count(*)from employee group by
1order by 2 desc;*//*select count(*)from employeewhere Last_Name is null;*//*sel
ect count(*)/count(distinct(Employee_Number))from employee;*/select count(*)/cou
nt(distinct)Dept_Number)from employee;/*select count(*)/count(distinct(Job_Code)
)from employee;select count(*)/count(distinct(Last_Name))from employee;*/
597
2
SELECT Teradata
Students
00:00:00
00:00:00
61
4/18/2011 11:43:56
TFClass 00:00:00
1
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*//*select Last_Name,count(*)from employee group by
1order by 2 desc;*//*select count(*)from employeewhere Last_Name is null;*/selec
t count(*)/count(distinct(Employee_Number))from employee;/*select count(*)/count
(distinct)Dept_Number)from employee;select count(*)/count(distinct(Job_Code))fro
m employee;select count(*)/count(distinct(Last_Name))from employee;*/ 593
2
SELECT Teradata
Students
00:00:00
00:00:00
59
4/18/2011 11:43:30
TFClass 00:00:00
1
3706
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*//*select Last_Name,count(*)from employee group by
1order by 2 desc;*//*select count(*)from employeewhere Last_Name is null;*/selec
t count(*)/count(distinct(Employee_Number))from employee;select count(*)/count(d
istinct)Dept_Number)from employee;select count(*)/count(distinct(Job_Code))from
employee;select count(*)/count(distinct(Last_Name))from employee;
589
4
SELECT Teradata
Students
00:00:00
00:00:00
58
4/18/2011 11:43:08
TFClass 00:00:00
0
3707
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*//*select Last_Name,count(*)from employee group by
1order by 2 desc;*//*select count(*)from employeewhere Last_Name is null;*/selec
t count(*)/count(distinct(Employee_Number))from employeeselect count(*)/count(di
stinct)Dept_Number)from employeeselect count(*)/count(distinct(Job_Code))from em
ployeeselect count(*)/count(distinct(Last_Name))from employee 585
1
SELECT Teradata
Students
00:00:00
00:00:00
57
4/18/2011 11:40:55
TFClass 00:00:00
1
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*//*select Last_Name,count(*)from employee group by
1order by 2 desc;*/select count(*)from employeewhere Last_Name is null; 339
1
SELECT Teradata
Students
00:00:00
00:00:00
56
4/18/2011 11:40:36
TFClass 00:00:00
1
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*//*select Last_Name,count(*)from employee group by
1order by 2 desc;*/select count(*)from employeewhere Job_Code is null; 338
1
SELECT Teradata
Students
00:00:00
00:00:00
55
4/18/2011 11:40:26
TFClass 00:00:00
1
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*//*select Last_Name,count(*)from employee group by
1order by 2 desc;*/select count(*)from employeewhere Dept_Number is null;
341
1
SELECT Teradata
Students
00:00:00
00:00:00
54
4/18/2011 11:40:12
TFClass 00:00:00
1
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*//*select Last_Name,count(*)from employee group by
1order by 2 desc;*/select count(*)from employeewhere Employee_Number is null;
345
1
SELECT Teradata
Students
00:00:00
00:00:00
53
4/18/2011 11:39:01
TFClass 00:00:00
464
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*/select Last_Name,count(*)from employee group by 1o
rder by 2 desc; 277
1
SELECT Teradata
Students
00:00:00
00:00:00
52
4/18/2011 11:38:35
TFClass 00:00:00
52
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*/select Job_Code,count(*)from employee group by 1or
der by 2 desc; 276
1
SELECT Teradata
Students
00:00:00
00:00:00
51
4/18/2011 11:38:12
TFClass 00:00:00
61
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*/select Dept_Number,count(*)from employee group by
1order by 2 desc;
279
1
SELECT Teradata
Students
00:00:00
00:00:00
50
4/18/2011 11:36:45
TFClass 00:00:00
1000
/*select
count(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number))
as deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name))
as lastnumcntfrom employee;*/select Employee_Number,count(*)from employee group
by 1order by 2 desc; 283
1
SELECT Teradata
Students
00:00:00
00:00:00
49
4/18/2011 11:34:00
TFClass 00:00:00
1
select c
ount(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number)) a
s deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name)) a
s lastnumcntfrom employee;
202
1
SELECT Teradata
Students
00:00:00
00:00:00
48
4/18/2011 11:33:43
TFClass 00:00:00
0
3807
select c
ount(distinct(Employee_Number)) as employeenumcnt,count(distinct(Dept_Number)) a
s deptnumcnt,count(distinct(Job_Code)) as jobnumcnt,count(distinct(Last_Name)) a
s lastnumcntfrom empployee;
203
1
SELECT Teradata
Students
00:00:00
00:00:00
47
4/18/2011 11:32:25
TFClass 00:00:00
0
3706
select c
ount(distinct(Employee_Number)) as employeenumcnt,count(Dept_Number)) as deptnum
cnt,count(Job_Code)) as jobnumcnt,count(Last_Name)) as lastnumcntfrom empployee;
176
1
SELECT Teradata
Students
00:00:00
00:00:00
46
4/18/2011 11:26:55
TFClass 00:00:00
1
/*insert
into employee select * from pd.employee;*/select count(*) from employee;
83
1
SELECT Teradata
Students
00:00:00
00:00:00
45
4/18/2011 11:26:25
TFClass 00:00:00
0
insert i
nto employee select * from pd.employee; 47
1
INSERT Teradata
Students
00:00:00
00:00:00
44
4/18/2011 11:23:38
TFClass 00:00:01
0
create t