Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Winner per Region

Return the candidate with the most votes in each region (include ties). Order by region, candidate.

Table schema

Votes(voter_id INT PRIMARY KEY, candidate VARCHAR(5), region VARCHAR(5))

Sample data

voter_id | candidate | region
1 | X | N
2 | X | N
3 | Y | N
4 | Y | S
5 | Z | S
6 | Y | S
7 | X | S
8 | Z | N

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.