.sql

5 claimants 4 primary 1 secondary shared primary (4)

SWH popularity

From the SWH-MSR-ARV dataset (Desmazières, Di Cosmo, Lorentz, MSR 2025; file nb_extensions_alphanum.csv) — one row per (ext, year) in the full SWH archive. Case-aggregated. citation.

31.4M
total occurrences
9.9M
since 2019 (31.3%)
1970–2023
years active

Case variants in archive: .sql (31.3M), .SQL (117.6K), .Sql (3.1K), .SQl (41), .sqL (32), .sQL (6), .sQl (2), .SqL (1) — aggregated above.

Attribution status

This extension is attributed to PLSQL; SQL; SQL; SQL; SQL PL; SQL PL; TSQL; TSQL as primary by 8 authoritative claims.

Authoritative sources: ✓ Linguist ✓ Pygments ✓ Wikidata · Q47607 ✗ Wikipedia · no claim

Disagree or have a correction? Open a labelling issue.

Claimants (10)

Languages that list .sql among their extensions. Strength reflects whether the upstream source treated it as their primary extension.
LanguageSourceStrength
PLSQLpygmentsprimary
SQLlinguistprimary
SQLpygmentsprimary
SQLwikidataprimary
SQL PLlinguistprimary
SQL PLpygmentsprimary
TSQLlinguistprimary
TSQLpygmentsprimary
PL/pgSQLlinguistsecondary
PLSQLlinguistsecondary

Wikidata says… (3)

File formats, image formats, audio codecs and other non-PL entities that claim .sql on Wikidata (property P1195) or in the Wikipedia infobox. Source: data/derived/external_extension_index.csv. Click Use as new PL on any row to open the Add-PL form pre-filled with that entry's name, Wikipedia/Wikidata URL, and this extension — one submission creates the PL + claim.
Right entry isn't listed? Add manually ↗
FormatClass (Wikidata P31)Suggested labelMIMENotesAction
phpMyAdmin SQL dumpTRUM Q105853077
FILE FORMATDWE
file formatUse as new PL ↗
Structured Query Language script Q62625630
file format
file formatapplication/sql; text/x-sqlUse as new PL ↗
Transact-SQL file format Q131304603
file format
file formattext/x-tsqlUse as new PL ↗

Disambiguation rules (5)

Linguist heuristics that decide, by content, which language a .sql file actually is.
RulePredictsKindPredicates (truncated)
h/linguist/.sql/0PL/pgSQLpredicates[{"kind": "any", "regexes": ["(?i:^\\\\i\\b|AS\\s+\\$\\$|LANGUAGE\\s+'?plpgsql'?|BEGIN(\\s+WORK)?\\s*;)"]}]
h/linguist/.sql/1SQL PLpredicates[{"kind": "any", "regexes": ["(?i:ALTER\\s+MODULE|MODE\\s+DB2SQL|\\bSYS(CAT|PROC)\\.|ASSOCIATE\\s+RESULT\\s+SET|\\bEND!\\s*$)"]}]
h/linguist/.sql/2PLSQLpredicates[{"kind": "any", "regexes": ["(?i:\\$\\$PLSQL_|XMLTYPE|systimestamp|\\.nextval|CONNECT\\s+BY|AUTHID\\s+(DEFINER|CURRENT_USER)|constructor\\W+function)"]}]
h/linguist/.sql/3TSQLpredicates[{"kind": "any", "regexes": ["(?i:^\\s*GO\\b|BEGIN(\\s+TRY|\\s+CATCH)|OUTPUT\\s+INSERTED|DECLARE\\s+@|\\[dbo\\])"]}]
h/linguist/.sql/4SQLdefault[]

SWH-mined examples (2)

Real archived programs with this extension, byte-verified against the SWH archive. Useful for deciding what this extension actually is when the attribution is uncertain.
Schema_LOC_DMS_Ops_Admin.sql · 92 B · seen 2650× in SWH
predicted: TSQL via heuristic
swh:1:cnt:208f7fec9e6092c3253088427bc5d6c2fe69f050;origin=https://github.com/PNNL-Comp-Mass-Spec/DBSchema_DMS;anchor=swh:1:rev:b3fe150766644acb8c82e5900ba1b642233b8e05;path=/DMS5/Schema_LOC_DMS_Ops_Admin.sql
Open in SWH · Raw bytes
get_stat_activity.sql · 779 B · seen 2136× in SWH
predicted: PL/pgSQL via heuristic
swh:1:cnt:b9668f1083290e2af716061aca470fcc93e3d310;origin=https://github.com/PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS;anchor=swh:1:rev:ba3195740b6407e08d3a6c8dfe0e2d7454c740c5;path=/dms/get_stat_activity.sql
Open in SWH · Raw bytes
Request more SWH-mined examples
If the examples above don't disambiguate what .sql is, request a fresh mining run.
(or open the pre-filled issue directly)