SELECT o.user_id, point + SUM(order_price) AS point FROM order_tb o JOIN uservip_tb u ON o.user_id = u.user_id WHERE order_price > 100 GROUP BY o.user_id ORDER BY point DESC