全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1244 0
2015-08-07
[size=12.8000001907349px]Print  the top 2 sale for the last two years info
[size=12.8000001907349px]
[size=12.8000001907349px]1.  Assume  the sale order table is in DB2  with the following colums
[size=12.8000001907349px]
[size=12.8000001907349px]    EXEC SQL DECLARE  CUSTOMER_SALE TABLE     
[size=12.8000001907349px]
[size=12.8000001907349px]    CUST_ID                   [size=12.8000001907349px]          CHAR(6)  NOT NULL,
[size=12.8000001907349px]    SALE_DATE                     [size=12.8000001907349px]    DATE  NOT NULL,
[size=12.8000001907349px]    SALE_AMOUNT                   DECIMAL(9, 2) NOT NULL
[size=12.8000001907349px]   
[size=12.8000001907349px]2.  The top one sale get 10% bouns of his total sale of that year
[size=12.8000001907349px]     The top second Sale get 5% bouns of his total sale of that year
[size=12.8000001907349px]
[size=12.8000001907349px]3.  Print the report below   (Include 2015 and 2014)
[size=12.8000001907349px]
[size=12.8000001907349px]     Cust_Id     Sale_Date      Sale_Amount     Bonus
[size=12.8000001907349px]     -----------    -------------     ------------------    --------
[size=12.8000001907349px]      100001     2015-04-01        $12,000.00
[size=12.8000001907349px]                       2015-[size=12.8000001907349px]07-01        $18,000.00
[size=12.8000001907349px]                 
[size=12.8000001907349px]                               The toal     $30,000.00   $3000.00   
[size=12.8000001907349px]                     
[size=12.8000001907349px]      xxxxxxx     2015-02-02  [size=12.8000001907349px]     $18,000.00
[size=12.8000001907349px]                       2015-[size=12.8000001907349px]07-02       $10,000.00   
[size=12.8000001907349px]
[size=12.8000001907349px]                               The total    $28,000.00   $1400.00
[size=12.8000001907349px]
[size=12.8000001907349px]      xxxxxxx     2014-04-01        $18,000.00
[size=12.8000001907349px]                       2014-[size=12.8000001907349px]07-01        $18,000.00
[size=12.8000001907349px]                 
[size=12.8000001907349px]                               The toal     $36,000.00   $3600.00   
[size=12.8000001907349px]                     
[size=12.8000001907349px]      xxxxxxx     2014-02-02  [size=12.8000001907349px]      $18,000.00
[size=12.8000001907349px]                        2014-07-02       $12,000.00   
[size=12.8000001907349px]
[size=12.8000001907349px]                               The total    $30,000.00   $1500.00
代码应该怎么写啊!?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群