How to write query for conerting balls to overs in SQL?

Ramana Kopparapu 226 Reputation points
2022-11-04T11:42:01.173+00:00

Hi,

Here is my input with number of balls and runs per each ball. I want to get output in the form of overs & total runs in SQL.

balls runs Overs Total Runs
1 3 2 25
2 1
3 0
4 6
5 0
6 2
1 4
2 3
3 3
4 0
5 1
6 2

Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,575 questions
{count} votes