CREATE TABLE trafodion.sales.odetail
( ordernum    NUMERIC (6) UNSIGNED NO DEFAULT NOT NULL
, partnum     NUMERIC (4) UNSIGNED NO DEFAULT NOT NULL
, unit_price  NUMERIC (8, 2)       NO DEFAULT NOT NULL
, qty_ordered NUMERIC (5) UNSIGNED NO DEFAULT NOT NULL
, PRIMARY KEY ( ordernum, partnum )
) ;

INSERT INTO trafodion.sales.odetail VALUES
  ( 100210,  244,  3500.00,   3 )
, ( 100210, 2001,  1100.00,   3 )
, ( 100210, 2403,   620.00,   6 )
, ( 100210, 5100,   150.00,  10 )
, ( 100250,  244,  3500.00,   4 )
, ( 100250, 5103,   400.00,  10 )
, ( 100250, 6301,   245.00,  15 )
, ( 100250, 6500,    95.00,  10 )
, ( 101220,  255,  3900.00,  10 )
, ( 101220, 5103,   400.00,   3 )
, ( 101220, 7102,   275.00,   7 )
, ( 101220, 7301,   425.00,   8 )
, ( 200300,  244,  3500.00,   8 )
, ( 200300, 2001,  1000.00,  10 )
, ( 200300, 2002,  1400.00,  10 )
, ( 200320, 5504,   165.00,   5 )
, ( 200320, 6201,   195.00,  16 )
, ( 200320, 6301,   245.00,   6 )
, ( 200320, 6400,   540.00,   7 )
, ( 200490, 3210,   715.00,   1 )
, ( 200490, 5505,   350.00,   1 )
, ( 300350,  244,  2800.00,  20 )
, ( 300350, 5100,   150.00,   5 )
, ( 300350, 5110,   525.00,  12 )
, ( 300350, 6301,   245.00,   5 )
, ( 300350, 6400,   550.00,   5 )
, ( 300380,  244,  3000.00,   6 )
, ( 300380, 2402,   320.00,  12 )
, ( 300380, 2405,   760.00,   8 )
, ( 400410,  212,  2450.00,  12 )
, ( 400410,  255,  3800.00,  12 )
, ( 400410, 2001,  1000.00,  36 )
, ( 400410, 6301,   240.00,  48 )
, ( 400410, 6400,   500.00,  70 )
, ( 400410, 7301,   415.00,  36 )
, ( 500450,  212,  2500.00,   8 )
, ( 500450,  255,  3900.00,  12 )
, ( 500450, 2001,  1100.00,  16 )
, ( 500450, 2002,  1500.00,  16 )
, ( 500450, 2402,   330.00,  48 )
, ( 600480, 2001,  1000.00,  60 )
, ( 600480, 2002,  1450.00,  20 )
, ( 600480, 2003,  1900.00,  40 )
, ( 600480, 3103,  4000.00,  40 )
, ( 600480, 3205,   625.00,  20 )
, ( 600480, 5100,   135.00,  60 )
, ( 600480, 5103,   390.00,  20 )
, ( 600480, 7301,   425.00,  40 )
, ( 700410, 2003,  1900.00,  65 )
, ( 700410, 2403,   650.00,  10 )
, ( 700510,  255,  4000.00,   4 )
, ( 700510, 6500,    95.00,   8 )
, ( 700510, 7102,   275.00,   5 )
, ( 800660,  244,  3000.00,   6 )
, ( 800660, 2001,  1000.00,  30 )
, ( 800660, 2403,   600.00,  48 )
, ( 800660, 2405,   795.00,  10 )
, ( 800660, 3201,   525.00,   6 )
, ( 800660, 3205,   600.00,  18 )
, ( 800660, 3210,   715.00,   6 )
, ( 800660, 4102,    26.00, 130 )
, ( 800660, 5100,   150.00,  12 )
, ( 800660, 5101,   200.00,   6 )
, ( 800660, 5110,   490.00,  48 )
, ( 800660, 5504,   165.00,  18 )
, ( 800660, 6201,   195.00,   6 )
, ( 800660, 6301,   235.00,  24 )
, ( 800660, 6400,   525.00,  30 )
, ( 800660, 6401,   700.00,  36 )
, ( 800660, 6500,    95.00,  22 )
, ( 800660, 7102,   275.00,   6 )
, ( 800660, 7301,   425.00,  12 )
;

UPDATE STATISTICS FOR TABLE trafodion.sales.odetail ON EVERY COLUMN ;
