Upload 4 files
Browse files
nlp/__pycache__/query_processor.cpython-312.pyc
CHANGED
|
Binary files a/nlp/__pycache__/query_processor.cpython-312.pyc and b/nlp/__pycache__/query_processor.cpython-312.pyc differ
|
|
|
nlp/__pycache__/sql_model.cpython-312.pyc
CHANGED
|
Binary files a/nlp/__pycache__/sql_model.cpython-312.pyc and b/nlp/__pycache__/sql_model.cpython-312.pyc differ
|
|
|
nlp/sql_model.py
CHANGED
|
@@ -22,30 +22,18 @@ class SQLModel:
|
|
| 22 |
"- Manager (VARCHAR)\n\n"
|
| 23 |
"Here are a few examples:\n\n"
|
| 24 |
"1. **Input**: \"Show me all employees in the Sales department.\"\n"
|
| 25 |
-
"**Output**:
|
| 26 |
-
" SELECT *\n"
|
| 27 |
-
" FROM Employees\n"
|
| 28 |
-
" WHERE Department = 'Sales';\n\n"
|
| 29 |
"2. **Input**: \"Who is the manager of the Engineering department?\"\n"
|
| 30 |
-
"**Output**:
|
| 31 |
-
" SELECT Manager\n"
|
| 32 |
-
" FROM Departments\n"
|
| 33 |
-
" WHERE Name = 'Engineering';\n\n"
|
| 34 |
"3. **Input**: \"List all employees hired after 2021-01-01.\"\n"
|
| 35 |
-
"**Output**:
|
| 36 |
-
" SELECT *\n"
|
| 37 |
-
" FROM Employees\n"
|
| 38 |
-
" WHERE Hire_Date > '2021-01-01';\n\n"
|
| 39 |
"4. **Input**: \"What is the total salary expense for the Marketing department?\"\n"
|
| 40 |
-
"**Output**:
|
| 41 |
-
" SELECT SUM(Salary)\n"
|
| 42 |
-
" FROM Employees\n"
|
| 43 |
-
" WHERE Department = 'Marketing';\n\n"
|
| 44 |
"5. **Input**: \"Find the average salary of employees in each department.\"\n"
|
| 45 |
-
"**Output**:
|
| 46 |
-
"
|
| 47 |
-
"
|
| 48 |
-
|
| 49 |
"Please do not return additional text besides query.\n"
|
| 50 |
"Please only answer queries which makes sense for the given schema. Else just return - \"No information found\""
|
| 51 |
)
|
|
|
|
| 22 |
"- Manager (VARCHAR)\n\n"
|
| 23 |
"Here are a few examples:\n\n"
|
| 24 |
"1. **Input**: \"Show me all employees in the Sales department.\"\n"
|
| 25 |
+
"**Output**:""SELECT * FROM Employees WHERE Department = 'Sales';"
|
|
|
|
|
|
|
|
|
|
| 26 |
"2. **Input**: \"Who is the manager of the Engineering department?\"\n"
|
| 27 |
+
"**Output**:""SELECT Manager FROM Departments WHERE Name = 'Engineering';"
|
|
|
|
|
|
|
|
|
|
| 28 |
"3. **Input**: \"List all employees hired after 2021-01-01.\"\n"
|
| 29 |
+
"**Output**:""SELECT *""FROM Employees""WHERE Hire_Date > '2021-01-01';"
|
|
|
|
|
|
|
|
|
|
| 30 |
"4. **Input**: \"What is the total salary expense for the Marketing department?\"\n"
|
| 31 |
+
"**Output**:""SELECT SUM(Salary) FROM Employees WHERE Department = 'Marketing';"
|
|
|
|
|
|
|
|
|
|
| 32 |
"5. **Input**: \"Find the average salary of employees in each department.\"\n"
|
| 33 |
+
"**Output**:""SELECT Department, AVG(Salary) AS average_salary FROM Employees GROUP BY Department;"
|
| 34 |
+
"6. **Input**: \"Find the name of employee with Highest salary in HR department.\"\n"
|
| 35 |
+
"**Output**:""SELECT Name FROM Employees WHERE Department = 'HR' AND Salary = (SELECT MAX(Salary) FROM Employees WHERE Department = 'HR');"
|
| 36 |
+
|
| 37 |
"Please do not return additional text besides query.\n"
|
| 38 |
"Please only answer queries which makes sense for the given schema. Else just return - \"No information found\""
|
| 39 |
)
|