楼主: stu_2295341
1259 0

请高手们帮忙解答 [推广有奖]

  • 0关注
  • 0粉丝

高中生

12%

还不是VIP/贵宾

-

威望
0
论坛币
4 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
469 点
帖子
20
精华
0
在线时间
9 小时
注册时间
2015-5-1
最后登录
2016-6-23

楼主
stu_2295341 发表于 2015-8-7 12:55:02 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
[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
代码应该怎么写啊!?
二维码

扫码加我 拉你入群

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

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

关键词:following Customer decimal include amount following

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 22:23