0 group by oid order by value desc, u.uid asc limit 10 */ public function getDailyWinMoney() { $start = ts_of_day(); return Db::query( "select u.uid, u.avatar, u.nickname, u.level, sum(reparation) as value from tw_store_order_cart_info tsoci inner join tw_store_order tso on tsoci.oid=tso.id inner join tw_user u on tso.uid = u.uid where activity is not null and tso.pay_time > ? group by oid order by value desc, u.uid asc limit ?", [$start, 30,]); } }