大家來幫我看下這個SQL怎么寫??? (二)請魚兄來看看
CREATE TABLE T
(accou_no varchar(10),
item_code varchar(25),
currency varchar(10),
price numeric(8,2),
date1 datetime
)
insert into t
select '10017 ', 'E01XC6371A501PR ', 'HKD ', 1.8500000000000001 , '2006-10-19 00:00:00.000 ' union all
select '10017 ', 'E01XC6371A501PR ', 'HKD ', 1.75 , '2007-03-13 00:00:00.000 ' union all
select '10017 ', 'E01XC6371A501PR ', 'HKD ', 1.6499999999999999 , '2007-07-04 00:00:00.000 ' union all
select '10410 ', 'E01C1001B ' , 'HKD ', 0.0 , '2006-09-08 00:00:00.000 ' union all
select '10410 ', 'E01C1001B ' , 'HKD ', 0.0 , '2006-09-08 00:00:00.000 ' union all
select '10410 ', 'E01C1001B ' , 'HKD ', 0.112 , '2006-09-16 00:00:00.000 ' union all
select '10410 ', 'E01C1001B ' , 'HKD ', 0.112 , '2006-09-16 00:00:00.000 ' union all
select '10410 ', 'E01C1001B ' , 'HKD ', 0.112 , '2006-09-16 00:00:00.000 ' union all
select '10410 ', 'E01C1001B ' , 'HKD ', 0.112 , '2006-09-16 00:00:00.000 ' union all
select '10410 ', 'E01C1001B ' , 'HKD ', 0.112 , '2007-07-13 00:00:00.000 ' union all
select '10443 ', 'E06S1623A-T1B-L7-A ', 'HKD ', 6.6000000000000003E-2 , '2006-10-27 00:00:00.000 ' union all
select '10443 ', 'E06S1623A-T1B-L7-A ', 'HKD ', 5.8000000000000003E-2 , '2007-06-20 00:00:00.000 ' union all
select '10443 ', 'E06S1623A-T1B-L7-A ', 'HKD ', 5.9499999999999997E-2 , '2007-07-05 00:00:00.000 ' union all
select '10638 ', 'E11234BCSN-01 ' , &nb