因此,我有一个这样的疑问;
select sum(points_add) as total_add, sum(points_subtract) as total_deducts, (sum(points_add)-sum(points_subtract)) as total_balance from tbl_points where user_id = 2;
我要怎么在拉拉维尔建它?我知道如何直到(sum(points_add)-sum(points_subtract)) as total_balance part为止,因为我不知道如何查询“--”减法函数“。