Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3956104
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:19:16+00:00 2026-05-20T02:19:16+00:00

There is a table like follow: Player Weight Hight Agility ____________________________________ ABC 135 70

  • 0

There is a table like follow:

Player    Weight    Hight    Agility
____________________________________
ABC        135       70         4
XYZ        155       65         1
PQR        121       69         7
MNO        171       73         5

I need a “Player Score” for each player, which is simply one point for each satisfied condition.

Example Conditions:
Weight < 150
Height > 67
Weight / Height < 1.8
Agility > 4

Thus based on above, the result might be:

Player     Score
________________
ABC          2
XYZ          0
PQR          4
MNO          2

Is it possible to achieve above using MYSQL ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:19:17+00:00Added an answer on May 20, 2026 at 2:19 am

    Look up MySQL flow control and try something like this…

    select player, (CASE when Weight < 150 then 1 else 0) + 
                   (CASE when Height >  67 then 1 else 0) +
                   (CASE when weight <  1.8*height then 1 else 0) +
                   (CASE when Agility > 4  then 1 else 0) 
    from table
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's a table like this one ______________________ | id | title | order |
I have a table like this: <table id='inventory_table'> <tr id='no_items_avail'> <td> There are no
Hi there I have an SQL table that looks like this: CREATE TABLE IF
I have two arrays of values like X,Y,Z and 1,2 There is a table
Is there a easy way to query a table for its constraints(foreignkeys specificaly) like
Are there any built-in C# data structures that are like a hash table but
I'm executing a query like this select field from table; In that query, there
As a follow-up to my previous question I would like to know if there
I have three tables like this: Person table: person_id | name | dob --------------------------------
well i have this messages table with sample values like these: msg_id recipient_id read

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.