Sql select sum group by id laravel join