Upload 5 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,18 +22,38 @@ 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 |
"2. **Input**: \"Who is the manager of the Engineering department?\"\n"
|
| 27 |
-
"**Output**:"
|
|
|
|
|
|
|
|
|
|
| 28 |
"3. **Input**: \"List all employees hired after 2021-01-01.\"\n"
|
| 29 |
-
"**Output**:"
|
|
|
|
|
|
|
|
|
|
| 30 |
"4. **Input**: \"What is the total salary expense for the Marketing department?\"\n"
|
| 31 |
-
"**Output**:"
|
|
|
|
|
|
|
|
|
|
| 32 |
"5. **Input**: \"Find the average salary of employees in each department.\"\n"
|
| 33 |
-
"**Output**:"
|
|
|
|
|
|
|
|
|
|
| 34 |
"6. **Input**: \"Find the name of employee with Highest salary in HR department.\"\n"
|
| 35 |
-
"**Output**:"
|
| 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 |
)
|
|
|
|
| 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**:\n\n"
|
| 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**:\n\n"
|
| 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**:\n\n"
|
| 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**:\n\n"
|
| 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**:\n\n"
|
| 46 |
+
" SELECT Department, AVG(Salary) AS average_salary\n"
|
| 47 |
+
" FROM Employees\n"
|
| 48 |
+
" GROUP BY Department;\n\n"
|
| 49 |
"6. **Input**: \"Find the name of employee with Highest salary in HR department.\"\n"
|
| 50 |
+
"**Output**:\n\n"
|
| 51 |
+
" SELECT Name\n"
|
| 52 |
+
" FROM Employees\n"
|
| 53 |
+
" WHERE Department = 'HR'\n"
|
| 54 |
+
" AND Salary = (SELECT MAX(Salary)\n"
|
| 55 |
+
" FROM Employees\n"
|
| 56 |
+
" WHERE Department = 'HR');\n\n"
|
| 57 |
"Please do not return additional text besides query.\n"
|
| 58 |
"Please only answer queries which makes sense for the given schema. Else just return - \"No information found\""
|
| 59 |
)
|