Datasets:
Tasks:
Text2Text Generation
Modalities:
Text
Formats:
parquet
Languages:
English
Size:
1K - 10K
Tags:
text-to-sql
License:
Update spider.py
Browse files
spider.py
CHANGED
@@ -9,7 +9,7 @@ my_spider_df = pd.DataFrame(my_spider_dataset)
|
|
9 |
|
10 |
# Step 3: Add a new row to the DataFrame
|
11 |
new_example = {
|
12 |
-
'db_id': '
|
13 |
'query': "SELECT AVG(salary) FROM employees WHERE join_date > '2015-01-01' AND department = 'Marketing';",
|
14 |
'question': 'What is the average salary of employees who joined after 2015 and work in the Marketing department?',
|
15 |
'query_toks': ['SELECT', 'AVG', '(', 'salary', ')', 'FROM', 'employees', 'WHERE', 'join_date', '>', "'2015-01-01'", 'AND', 'department', '=', "'Marketing'", ';'],
|
|
|
9 |
|
10 |
# Step 3: Add a new row to the DataFrame
|
11 |
new_example = {
|
12 |
+
'db_id': 'employee_database', # Replace with the actual database ID
|
13 |
'query': "SELECT AVG(salary) FROM employees WHERE join_date > '2015-01-01' AND department = 'Marketing';",
|
14 |
'question': 'What is the average salary of employees who joined after 2015 and work in the Marketing department?',
|
15 |
'query_toks': ['SELECT', 'AVG', '(', 'salary', ')', 'FROM', 'employees', 'WHERE', 'join_date', '>', "'2015-01-01'", 'AND', 'department', '=', "'Marketing'", ';'],
|