Jump to content
  • 0

SQL command COUNT in existing command


Question

Posted (edited)

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

2 answers to this question

Recommended Posts

  • 0
Posted
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 🙂

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...