user_id); } public function table(Table $table): Table { return $table ->query( MemberPoint::query() ->selectRaw('user_id, SUM(points) as total_points') ->groupBy('user_id') ->orderByDesc('total_points') ->limit(10) ->with('user') ) ->columns([ TextColumn::make('user.name')->label('Anggota'), TextColumn::make('total_points')->label('Total Poin') ->badge()->color('success'), ]) ->paginated(false); } }