Datasets:
metadata
license: other
license_name: openrail-d
license_link: >-
https://www.licenses.ai/blog/2022/8/18/naming-convention-of-responsible-ai-licenses
task_categories:
- text-generation
language:
- en
pretty_name: annotated SQL
size_categories:
- 1M<n<10M
tags:
- code
- sql
This dataset focuses the SQL corpus of the Stack v2 dedup dataset and provides annotations to each SQL file therein. sqlparse is used to parse the SQL code, then count keywords and symbols.
Below are the annotation columns.
Column Name | Column Description |
---|---|
Keyword.DML | Data Manipulation Language commands for modifying database records, e.g. SELECT , INSERT , UPDATE , DELETE , COMMIT , MERGE , ROLLBACK . |
Keyword.DDL | Data Definition Language commands for defining or altering database structure, e.g. ALTER , CREATE , DROP . |
Keyword.DCL | Data Control Language commands for managing access and permissions, e.g. GRANT , REVOKE . |
Keyword | Reserved words in SQL that represent operations or command, e.g. FROM , WHERE , JOIN , GROUP , ORDER , IF , WHILE , MIN , MAX , AND , OR , ON . |
Name.Builtin | Built-in data types or reserved names in SQL, e.g. INTEGER , FLOAT , CHAR , VARCHAR , DATE , TIMESTAMP . |
Operator | Arithmetic, logical, or other operators used for SQL expressions, e.g. + , - , * . |
Operator.Comparison | Operators for comparing values in SQL expressions, e.g. == , >= , <= , <> , LIKE , REGEXP . |
Assignment | Symbols used for assigning values in SQL expressions, e.g. := . |
Punctuation | Symbols used for structuring SQL syntax, e.g.( , ) , , , . , : , :: , ; , [ , ] . |
Wildcard | Symbols representing a selection of all columns or rows, e.g. * . |
Keyword.Order | Keywords for specifying sorting orders in query results, e.g. ASC , DESC . |
Keyword.CTE | Common Table Expression keywords for defining temporary result sets, e.g. WITH . |
Keyword.TZCast | Keywords for casting time zones in SQL queries, e.g. AT TIME ZONE 'UTC' . |
Name | Represents identifiers such as table or column names. |
Name.Placeholder | Placeholders used for dynamic or parameterized queries. |
Literal | Literal values like numbers, strings, or other constants. |
Literal.Number.Integer | Integer numeric literals in SQL expressions. |
Literal.Number.Float | Floating-point numeric literals in SQL expressions. |
Literal.Number.Hexadecimal | Hexadecimal numeric literals in SQL expressions. |
Literal.String.Single | Single-quoted string literals in SQL expressions. |
Literal.String.Symbol | Symbolic literals used in SQL expressions or commands. |
Comment.Multiline | Represents multi-line comments in SQL code. |
Comment.Multiline.Hint | Multi-line comments providing additional context or hints. |
Comment.Single | Represents single-line comments in SQL code. |
Comment.Single.Hint | Single-line comments providing additional context or hints. |
Text.Whitespace | Represents spaces or tabs in the SQL code for formatting. |
Text.Whitespace.Newline | Represents newline characters in SQL code for line breaks. |
Generic.Command | General commands that may not fall into specific SQL categories. |