select a.客户名,sum(a.交易金额/b.汇率) as 交易金额
from table1 a ,table2 b
where a.币种=b.币种
group by a.客户名
having sum(a.交易金额/b.汇率)>400

解决方案 »

  1.   

    select a.客户名 from table1 a ,table2 b where a.币种 = b.币种 and a.交易金额 * b.汇率 > 400
      

  2.   

    select 客户名 from table 1,table 2 where table 1.币种=table 2.币种 and 交易金额*汇率>400)
      

  3.   

    晕倒 应该是乘的 呵呵select a.客户名,sum(a.交易金额*b.汇率) as 交易金额
    from table1 a ,table2 b
    where a.币种=b.币种
    group by a.客户名
    having sum(a.交易金额*b.汇率)>400
      

  4.   

    select table1.客户名 from table1 let join table2 on table1.币种=table2.币种 where table1.交易金额*table2.汇率 > 400