Skip to content

SQL command COUNT in existing command

Featured Replies

Hi,

 

I want to count all points from table character_raid_points for same charId

 

Example: I have 100 records for charID: 11111 and in every records has different int points for kill RB.

 

So I need to COUNT all RBs points per charId
 

"SELECT characters.char_name,character_raid_points.charId, character_raid_points.points FROM character_raid_points, characters WHERE character_raid_points.points AND characters.charId = character_raid_points.charId ORDER BY points DESC LIMIT 10;"


This command now generate CharId and points pet one row ( i mean per one kill RB )  - so Need to count all to one INT
 

Edited by Vision

Group it by char id and select like sum(character_raid_points.*) as scores and join char table to select char name

  • 1 year later...
  • Author
On 11/21/2022 at 12:35 AM, wongerlt said:

Group it by char id and select like sum(character_raid_points.*) as scores and join char table to select char name


Thank you, already done 🙂

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.