Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -10,4 +10,96 @@ language:
|
|
10 |
pretty_name: annotated SQL
|
11 |
size_categories:
|
12 |
- 1M<n<10M
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
pretty_name: annotated SQL
|
11 |
size_categories:
|
12 |
- 1M<n<10M
|
13 |
+
tags:
|
14 |
+
- code
|
15 |
+
- sql
|
16 |
+
---
|
17 |
+
|
18 |
+
This dataset focuses the SQL corpus of the [Stack v2 dedup](https://huggingface.co/datasets/bigcode/the-stack-v2-dedup) dataset and provides annotations to each SQL file therein.
|
19 |
+
[sqlparse](https://github.com/andialbrecht/sqlparse) is used to parse the SQL code, then count keywords and symbols.
|
20 |
+
|
21 |
+
Below are the annotation columns.
|
22 |
+
|
23 |
+
### **Keyword.DML**
|
24 |
+
- Data Manipulation Language commands for modifying database records, e.g. `SELECT`, `INSERT`, `UPDATE`, `DELETE`, `COMMIT`, `MERGE`, `ROLLBACK`.
|
25 |
+
|
26 |
+
### **Keyword.DDL**
|
27 |
+
- Data Definition Language commands for defining or altering database structure, e.g. `ALTER`, `CREATE`, `DROP`.
|
28 |
+
|
29 |
+
### **Keyword.DCL**
|
30 |
+
- Data Control Language commands for managing access and permissions, e.g. `GRANT`, `REVOKE`.
|
31 |
+
|
32 |
+
### **Keyword**
|
33 |
+
- Reserved words in SQL that represent operations or command, e.g. `FROM`, `WHERE`, `JOIN`, `GROUP`, `ORDER`, `IF`, `WHILE`, `MIN`, `MAX`, `AND`, `OR`, `ON`.
|
34 |
+
|
35 |
+
### **Name.Builtin**
|
36 |
+
- Built-in data types or reserved names in SQL, e.g. `INTEGER`, `FLOAT`, `CHAR`, `VARCHAR`, `DATE`, `TIMESTAMP`.
|
37 |
+
|
38 |
+
### **Operator**
|
39 |
+
- Arithmetic, logical, or other operators used for SQL expressions, e.g. `+`, `-`, `*`.
|
40 |
+
|
41 |
+
### **Operator.Comparison**
|
42 |
+
- Operators for comparing values in SQL expressions, e.g. `==`, `>=`, `<=`, `<>`, `LIKE`, `REGEXP`.
|
43 |
+
|
44 |
+
### **Assignment**
|
45 |
+
- Symbols used for assigning values in SQL expressions, e.g. `:=`
|
46 |
+
|
47 |
+
### **Punctuation**
|
48 |
+
- Symbols used for structuring SQL syntax, e.g.`(`, `)`, `,`, `.`, `:`, `::`, `;`, `[`, `]`.
|
49 |
+
|
50 |
+
### **Wildcard**
|
51 |
+
- Symbols representing a selection of all columns or rows, e.g. `*`.
|
52 |
+
|
53 |
+
### **Keyword.Order**
|
54 |
+
- Keywords for specifying sorting orders in query results, e.g. `ASC`, `DESC`.
|
55 |
+
|
56 |
+
### **Keyword.CTE**
|
57 |
+
- Common Table Expression keywords for defining temporary result sets, e.g. `WITH`.
|
58 |
+
|
59 |
+
### **Keyword.TZCast**
|
60 |
+
- Keywords for casting time zones in SQL queries, e.g. `AT TIME ZONE 'UTC'`.
|
61 |
+
|
62 |
+
### **Name**
|
63 |
+
- Represents identifiers such as table or column names.
|
64 |
+
|
65 |
+
### **Name.Placeholder**
|
66 |
+
- Placeholders used for dynamic or parameterized queries.
|
67 |
+
|
68 |
+
### **Literal**
|
69 |
+
- Literal values like numbers, strings, or other constants.
|
70 |
+
|
71 |
+
### **Literal.Number.Integer**
|
72 |
+
- Integer numeric literals in SQL expressions.
|
73 |
+
|
74 |
+
### **Literal.Number.Float**
|
75 |
+
- Floating-point numeric literals in SQL expressions.
|
76 |
+
|
77 |
+
### **Literal.Number.Hexadecimal**
|
78 |
+
- Hexadecimal numeric literals in SQL expressions.
|
79 |
+
|
80 |
+
### **Literal.String.Single**
|
81 |
+
- Single-quoted string literals in SQL expressions.
|
82 |
+
|
83 |
+
### **Literal.String.Symbol**
|
84 |
+
- Symbolic literals used in SQL expressions or commands.
|
85 |
+
|
86 |
+
### **Comment.Multiline**
|
87 |
+
- Represents multi-line comments in SQL code.
|
88 |
+
|
89 |
+
### **Comment.Multiline.Hint**
|
90 |
+
- Multi-line comments providing additional context or hints.
|
91 |
+
|
92 |
+
### **Comment.Single**
|
93 |
+
- Represents single-line comments in SQL code.
|
94 |
+
|
95 |
+
### **Comment.Single.Hint**
|
96 |
+
- Single-line comments providing additional context or hints.
|
97 |
+
|
98 |
+
### **Text.Whitespace**
|
99 |
+
- Represents spaces or tabs in the SQL code for formatting.
|
100 |
+
|
101 |
+
### **Text.Whitespace.Newline**
|
102 |
+
- Represents newline characters in SQL code for line breaks.
|
103 |
+
|
104 |
+
### **Generic.Command**
|
105 |
+
- General commands that may not fall into specific SQL categories
|