perbaikan query aggregate