本次笔试一共五个题,3道SQL,1个概率题,1个abtest 给一个表ord,包括user_id(用户id),goods_id(商品id),goods_num(购买商品数),ord_amt(购买金额),creat_time(购买时间) 求最近30天商品的平均价格 select goods_id as '商品id',sum(ord_amt)/sum(goods_num) as '近30天平均价格' from (select goods_id,sum(ord_amt),sum(goods_num) from ord) where datediff(convert(new(...