I have tables that store scores of 1-3. i.e.
table 1
id | userid | t1-score1 | t1-score2 | t1-score3 | t1-score4 | t1-score5 | t1-score6 | t1-score7 | t1-score8 | t1-score9 | t1-score10
table 2
id | userid | t2-score1 | t2-score2 | t2-score3 | t2-score4 | t2-score5 | t2-score6 | t2-score7 | t2-score8 | t2-score9 | t2-score10
there are 8 of these tables.
The userid links back to the users table so we know sho scored what.
I have been asked to create a report for 100 random people to calculate
total number of 1's
total number of 2's
total number of 3's
I'm not sure how to go about this, I guess I need to
generate 100 random id's from the users table
use this id as userid in the score table and grab all scores from all 8 tables for each person
count the 1's, 2's and 3's. How do I count the number of 1's etc?
Can someone help?
Thanks
table 1
id | userid | t1-score1 | t1-score2 | t1-score3 | t1-score4 | t1-score5 | t1-score6 | t1-score7 | t1-score8 | t1-score9 | t1-score10
table 2
id | userid | t2-score1 | t2-score2 | t2-score3 | t2-score4 | t2-score5 | t2-score6 | t2-score7 | t2-score8 | t2-score9 | t2-score10
there are 8 of these tables.
The userid links back to the users table so we know sho scored what.
I have been asked to create a report for 100 random people to calculate
total number of 1's
total number of 2's
total number of 3's
I'm not sure how to go about this, I guess I need to
generate 100 random id's from the users table
use this id as userid in the score table and grab all scores from all 8 tables for each person
count the 1's, 2's and 3's. How do I count the number of 1's etc?
Can someone help?
Thanks