daljeetsingh commited on
Commit
cda2117
1 Parent(s): f2a9e61
Files changed (1) hide show
  1. example_queries.py +17 -97
example_queries.py CHANGED
@@ -8,122 +8,42 @@ small_query=""" Tables:
8
  long_query="""Tables:
9
 
10
  CREATE TABLE employees (
11
-
12
- EMPLOYEE_ID decimal(6,0),
13
-
14
- FIRST_NAME varchar(20),
15
-
16
- LAST_NAME varchar(25),
17
-
18
- EMAIL varchar(25),
19
-
20
- PHONE_NUMBER varchar(20),
21
-
22
- HIRE_DATE date,
23
-
24
- JOB_ID varchar(10),
25
-
26
- SALARY decimal(8,2),
27
-
28
- COMMISSION_PCT decimal(2,2),
29
-
30
- MANAGER_ID decimal(6,0),
31
-
32
  DEPARTMENT_ID decimal(4,0)
33
-
34
  )
35
-
36
-
37
-
38
  CREATE TABLE jobs (
39
-
40
- JOB_ID varchar(10),
41
-
42
- JOB_TITLE varchar(35),
43
-
44
- MIN_SALARY decimal(6,0),
45
-
46
- MAX_SALARY decimal(6,0)
47
-
48
  )
49
-
50
-
51
-
52
  CREATE TABLE locations (
53
-
54
- LOCATION_ID decimal(4,0),
55
-
56
- STREET_ADDRESS varchar(40),
57
-
58
- POSTAL_CODE varchar(12),
59
-
60
- CITY varchar(30),
61
-
62
- STATE_PROVINCE varchar(25),
63
-
64
- COUNTRY_ID varchar(2)
65
-
66
  )
67
-
68
-
69
-
70
  CREATE TABLE countries (
71
-
72
- COUNTRY_ID varchar(2),
73
-
74
- COUNTRY_NAME varchar(40),
75
-
76
  REGION_ID decimal(10,0)
77
-
78
  )
79
-
80
-
81
-
82
  CREATE TABLE job_history (
83
-
84
- EMPLOYEE_ID decimal(6,0),
85
-
86
- START_DATE date,
87
-
88
- END_DATE date,
89
-
90
- JOB_ID varchar(10),
91
-
92
  DEPARTMENT_ID decimal(4,0)
93
-
94
  )
95
-
96
-
97
-
98
  CREATE TABLE regions (
99
-
100
- REGION_ID decimal(5,0),
101
-
102
- REGION_NAME varchar(25)
103
-
104
  )
105
-
106
-
107
-
108
  CREATE TABLE departments (
109
-
110
- DEPARTMENT_ID decimal(4,0),
111
-
112
- DEPARTMENT_NAME varchar(30),
113
-
114
- MANAGER_ID decimal(6,0),
115
-
116
- LOCATION_ID decimal(4,0)
117
-
118
  )
119
 
120
-
121
-
122
  Question:
123
 
124
  For those employees who did not have any job in the past, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id, and list from low to high by the JOB_ID please.
125
 
126
-
127
-
128
  Answer:
129
- """
 
8
  long_query="""Tables:
9
 
10
  CREATE TABLE employees (
11
+ EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20),
12
+ LAST_NAME varchar(25), EMAIL varchar(25),
13
+ PHONE_NUMBER varchar(20), HIRE_DATE date,
14
+ JOB_ID varchar(10), SALARY decimal(8,2),
15
+ COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  DEPARTMENT_ID decimal(4,0)
 
17
  )
 
 
 
18
  CREATE TABLE jobs (
19
+ JOB_ID varchar(10), JOB_TITLE varchar(35),
20
+ MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0)
 
 
 
 
 
 
 
21
  )
 
 
 
22
  CREATE TABLE locations (
23
+ LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40),
24
+ POSTAL_CODE varchar(12), CITY varchar(30),
25
+ STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2)
 
 
 
 
 
 
 
 
 
 
26
  )
 
 
 
27
  CREATE TABLE countries (
28
+ COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40),
 
 
 
 
29
  REGION_ID decimal(10,0)
 
30
  )
 
 
 
31
  CREATE TABLE job_history (
32
+ EMPLOYEE_ID decimal(6,0), START_DATE date,
33
+ END_DATE date, JOB_ID varchar(10),
 
 
 
 
 
 
 
34
  DEPARTMENT_ID decimal(4,0)
 
35
  )
 
 
 
36
  CREATE TABLE regions (
37
+ REGION_ID decimal(5,0), REGION_NAME varchar(25)
 
 
 
 
38
  )
 
 
 
39
  CREATE TABLE departments (
40
+ DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30),
41
+ MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0)
 
 
 
 
 
 
 
42
  )
43
 
 
 
44
  Question:
45
 
46
  For those employees who did not have any job in the past, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id, and list from low to high by the JOB_ID please.
47
 
 
 
48
  Answer:
49
+ """