DROP TABLE CAR_DEALER_ACHIEVEMENT;
-- Create table
create table CAR_DEALER_ACHIEVEMENT
(
  the_year            VARCHAR2(4),
  the_month           VARCHAR2(2),
  car_dealer_code     VARCHAR2(20),
  checked_achievement NUMBER(16,2),
  policy_amount       INTEGER,
  cpic_amount         INTEGER,
  picc_amount         INTEGER,
  pingan_amount       INTEGER,
  others_amount       INTEGER
)
tablespace CAR_DEALER;
-- Add comments to the table 
comment on table CAR_DEALER_ACHIEVEMENT
  is '车商业绩表';
-- Add comments to the columns 
comment on column CAR_DEALER_ACHIEVEMENT.the_year
  is '统计年份';
comment on column CAR_DEALER_ACHIEVEMENT.the_month
  is '统计月份';
comment on column CAR_DEALER_ACHIEVEMENT.car_dealer_code
  is '车商代码';
comment on column CAR_DEALER_ACHIEVEMENT.checked_achievement
  is '店内双签产值';
comment on column CAR_DEALER_ACHIEVEMENT.policy_amount
  is '店内新车开票数';
comment on column CAR_DEALER_ACHIEVEMENT.cpic_amount
  is '太平洋保险新车签单台次';
comment on column CAR_DEALER_ACHIEVEMENT.picc_amount
  is '中国人保新车签单台次';
comment on column CAR_DEALER_ACHIEVEMENT.pingan_amount
  is '中国平安新车签单台次';
comment on column CAR_DEALER_ACHIEVEMENT.others_amount
  is '其他保险公司新车签单台次';
-- Create/Recreate indexes 
create index CAR_DEALER_ACHIEVEMENT_IDX01 on CAR_DEALER_ACHIEVEMENT (THE_YEAR, THE_MONTH, CAR_DEALER_CODE)
  tablespace CAR_DEALER_IDX;
-- Grant/Revoke object privileges 
grant select on CAR_DEALER_ACHIEVEMENT to DATACENTER;
