1308. Running Total for Different Genders
https://leetcode.com/problems/running-total-for-different-genders
Description
Table: Scores
+---------------+---------+
| Column Name | Type |
+---------------+---------+
| player\_name | varchar |
| gender | varchar |
| day | date |
| score\_points | int |
+---------------+---------+
(gender, day) is the primary key for this table.
A competition is held between females team and males team.
Each row of this table indicates that a player\_name and with gender has scored score\_point in someday.
Gender is 'F' if the player is in females team and 'M' if the player is in males team.Write an SQL query to find the total score for each gender at each day.
Order the result table by gender and day
The query result format is in the following example:
ac
Last updated
Was this helpful?