The largest SQL repositories by lines of code

OctoCounts has measured 13 public GitHub repositories whose primary programming language is SQL. TrinityCore/TrinityCore is the largest, with 21,554,419 code lines across 23,467 files, counted with tokei on November 5, 2026. The table ranks the 13 largest by code lines; each row links to a report pinned to the commit it counted.

RankRepositoryCode linesTotal linesFilesSQL share
1TrinityCore/TrinityCore21,554,41922,226,28423,46794.5%
2idempiere/idempiere2,056,7993,792,78610,98557.1%
3vmangos/core1,308,5291,626,4964,28358.8%
4beekeeper-studio/beekeeper-studio922,939951,5351,29685.8%
5qcadoo/mes645,6871,052,5444,34750.7%
6blitzy-public-samples/mes643,5671,049,6904,33150.7%
7babelfish-for-postgresql/babelfish_extensions342,484427,05147052.0%
8vulhub/vulhub49,34993,6362,00230.8%
9Yerm4/Servicio_Medico22,93124,3626763.2%
10Odyjmm/Desafio_Unifacisa11,96012,7278813.9%
11jackfrued/Python-100-Days7,15579,85022153.6%
12kachappillygeorgepeter/MindBees5,42614,1332064.3%
13SJLennon/IBM-i-RPG-Free-CLP-Code9732,4854071.3%

Ranking rule: a repository belongs to SQL when SQL is its largest programming language by code lines; data and prose formats such as JSON, YAML, TOML and Markdown do not count as a language for this rule. "SQL share" is the share of the repository's code lines written in SQL. Code lines exclude comments and blank lines. Every report uses OctoCounts' canonical public options, with tests, docs and generated directories excluded, and reports were generated on different dates.

SQL leaderboard FAQ

Which SQL repository has the most lines of code?

TrinityCore/TrinityCore is the largest SQL repository in OctoCounts' index, with 21,554,419 code lines out of 22,226,284 total lines across 23,467 files, counted on November 5, 2026. idempiere/idempiere follows with 2,056,799 code lines. Code size is not code quality: a larger count only means more source material.

How does a repository join the SQL leaderboard?

SQL must be its primary programming language: the language with the most code lines in the repository's OctoCounts report, ignoring data and prose formats such as JSON, YAML, TOML and Markdown. The repository then needs a public report with at least 5 files, and it is listed when it is among the 50 largest by code lines.

How many SQL repositories has OctoCounts measured?

13 public GitHub repositories have SQL as their primary programming language in OctoCounts' index. This page lists the 13 largest by code lines; a repository analyzed with custom counting options keeps those counts as a separate saved result.

Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use line counts to gauge the scale of what you would be reading or maintaining, not as a quality signal.