-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathESMFalseNegatives.tsv
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 8.
559 lines (559 loc) · 169 KB
/
ESMFalseNegatives.tsv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
database name gold pred equivalent reason note
car_1 SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1; SELECT Max(cars_data.MPG) FROM cars_data WHERE cars_data.Cylinders = 'terminal' OR cars_data.Year < 'terminal' Max value is equivalent to sorting with descending order limit 1
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' SELECT Documents.Document_ID FROM Documents JOIN Paragraphs on Paragraphs.Document_ID = Documents.Document_ID WHERE Paragraphs.Paragraph_Text = 1 INTERSECT SELECT Documents.Document_ID FROM Documents JOIN Paragraphs on Paragraphs.Document_ID = Documents.Document_ID WHERE Paragraphs.Paragraph_Text = 1 Semantically correct redundant join. Joining with a parent & primary key will not change the result.
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID select T1.Name , T3.Course from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID Semantically equivalent join, different joining order and aliases
student_transcripts_tracking SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs select count ( degree_program_id ) from Degree_Programs Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg( Age ) FROM Student WHERE StuID NOT IN ( SELECT StuID FROM Has_Pet ) In the second clause, stuID in Has_Pet refers to Student stuID column, and hence selecting from Student and joining on Has_Pet is equivalent to directly selecting StuID from Has_Pet.
student_transcripts_tracking SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs SELECT count(degree_program_id) FROM Degree_Programs Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, counting different columns of the same table leads to the same result
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' select Other_Details from Paragraphs where Paragraph_Text like 1 Our evaluation method replaces the value 1 in the prediction with the ground truth value "Korea". ' = "Korea"' is semantically equivalent to 'like "Korea"'. if we do not plug in the value our method is able to distinguish these two queries.
student_transcripts_tracking SELECT count(DISTINCT department_id) FROM Degree_Programs select count(*) from Degree_Programs join Departments on Degree_Programs.department_id = Departments.department_id Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, joining with the parent column Departments.department_id (which is a primary key) does not introduce new/delete existing columns; then counting any column is semantically equivalent.
dog_kennels SELECT count(DISTINCT dog_id) FROM Treatments select count(*) from Treatments join Dogs on Treatments.dog_id = Dogs.dog_id Semantically correct redundant join. Joining with a parent & primary key will not change the result.
pets_1 SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 SELECT Count(*) FROM Pets JOIN Has_Pet ON Pets.PetID = Has_Pet.PetID JOIN Student ON Has_Pet.StuID = Student.StuID WHERE Student.Age > 'terminal' Semantically correct redundant join. Joining with a parent & primary key will not change the result. (Notice that the table selection is different, but after reordering joining the cartesian product of the table is the same)
dog_kennels SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code SELECT T3.first_name,T1.treatment_type_description FROM Treatment_Types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code JOIN Professionals AS T3 ON T2.professional_id = T3.professional_id Semantically equivalent join, different joining order and aliases
dog_kennels SELECT DISTINCT breed_code , size_code FROM dogs SELECT Dogs.breed_code , Sizes.size_code FROM Sizes JOIN Dogs on Dogs.size_code = Sizes.size_code Semantically correct redundant join. Joining with a parent & primary key will not change the result.
singer SELECT Name FROM singer WHERE Citizenship != "France" SELECT T1.Name FROM singer AS T1 WHERE T1.Singer_ID NOT IN (SELECT T2.Singer_ID FROM singer AS T2 WHERE T2.Citizenship = 1 ) Semantically equiavlent rewriting, where "!=" is expressed as not belonging to a set that satisfies the "=" condition.
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' SELECT TV_Channel.id FROM TV_Channel EXCEPT SELECT Cartoon.Channel FROM TV_Channel JOIN Cartoon on Cartoon.Channel = TV_Channel.id WHERE Cartoon.Directed_by = 1 Semantically correct redundant join in the except clause. Joining with a parent & primary key will not change the result.
car_1 SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 2 ); SELECT Count(*) FROM (SELECT car_makers.Country FROM car_makers GROUP BY car_makers.Country HAVING Count(*) > 'terminal') Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
cre_Doc_Template_Mgt SELECT count(*) FROM Templates WHERE template_type_code = "CV" select count ( distinct template_type_code ) from templates where template_type_code = 1 Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) select avg ( Age ) from Student where StuID not in ( select StuID from Has_Pet ) Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
car_1 SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980; select distinct car_names.Model from cars_data join car_names on cars_data.Id = car_names.MakeId where cars_data.Year > 1980 Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) select avg ( Age ) from Student where StuID not in ( select StuID from Has_Pet ) Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
pets_1 SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog' SELECT Student.Fname FROM Pets JOIN Has_Pet ON Pets.PetID = Has_Pet.PetID JOIN Student ON Has_Pet.StuID = Student.StuID WHERE Pets.PetType = 'terminal' OR Pets.PetType = 'terminal' Semantically equivalent join, different joining order and aliases
flight_2 SELECT Airline FROM AIRLINES WHERE Abbreviation = "UAL" select airlines.airline from airlines where airlines.abbreviation like " % ual % " Our evaluation method replaces the value "% ual %" in the prediction with the ground truth value "ual". ' = "ual"' is semantically equivalent to 'like "ual"'. if we do not plug in the value our method is able to distinguish these two queries.
poker_player SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player) select people.name from people where not ( people.people_id in ( select poker_player.people_id from poker_player ) ) Semantically rewrite of not in. Create a intermediate column of boolean.
car_1 SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1; SELECT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model GROUP BY T1.Model ORDER BY count( * ) DESC LIMIT 1 Semantically correct redundant join. Joining with a parent & primary key will not change the result.
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM country JOIN countrylanguage GROUP BY countrylanguage.Language ORDER BY Count(*) Desc LIMIT 1 Semantically correct redundant join, and different joining order from the gold. Joining with a parent & primary key will not change the result.
student_transcripts_tracking SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1 select Courses.course_name from Student_Enrolment_Courses join Student_Enrolment on Student_Enrolment_Courses.student_enrolment_id = Student_Enrolment.student_enrolment_id join Courses on Student_Enrolment_Courses.course_id = Courses.course_id group by Courses.course_name order by count(*) desc limit 1 Semantically correct redundant join. Joining with a parent & primary key will not change the result.
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' SELECT Other_Details FROM Paragraphs WHERE Paragraph_Text like 1 Our evaluation method replaces the value 1 in the prediction with the ground truth value "Korea". ' = "Korea"' is semantically equivalent to 'like "Korea"'. if we do not plug in the value our method is able to distinguish these two queries.
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT Min(Highschooler.grade) FROM Highschooler WHERE Highschooler.ID NOT IN (SELECT Friend.student_id FROM Friend) Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
car_1 SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980; select distinct car_names.Model from cars_data join car_names on cars_data.Id = car_names.MakeId where cars_data.Year > "value" Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
cre_Doc_Template_Mgt SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id select distinct Documents.Document_ID , count(*) from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID group by Documents.Document_ID order by Documents.Document_ID asc Semantically correct redundant join. Joining with a parent & primary key will not change the result.
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT Avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT Has_Pet.StuID FROM Has_Pet) Semantically rewrite of not in. Create a intermediate column of boolean.
world_1 SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese" SELECT count(*) FROM countrylanguage AS T1 WHERE T1.Language = 1 Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, joining with a parent & primary key will not change the result, and counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
dog_kennels SELECT count(DISTINCT professional_id) FROM Treatments SELECT count( Treatments.professional_id ) FROM Dogs JOIN Treatments on Treatments.dog_id = Dogs.dog_id Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, joining with a parent & primary key will not change the result, and counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
dog_kennels SELECT DISTINCT breed_code , size_code FROM dogs select T2.breed_code , T1.size_code from Sizes as T1 join Dogs as T2 on T1.size_code = T2.size_code Semantically correct redundant join. Joining with a parent & primary key will not change the result.
cre_Doc_Template_Mgt SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents select templates.template_id from templates where templates.template_id not in (select documents.template_id from documents ) Semantically equivalent rewrite of "EXCEPT" into "not in"
pets_1 SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') SELECT Major,Age FROM Student WHERE StuID NOT IN ( SELECT T1.StuID FROM Has_Pet AS T1 JOIN Pets AS T2 ON T1.PetID = T2.PetID WHERE T2.PetType = 'cat' ) Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT min( Highschooler.grade ) FROM Highschooler WHERE Highschooler.ID not in ( SELECT Friend.student_id FROM Friend ) Semantically rewrite of not in. Create a intermediate column of boolean.
concert_singer SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014 select T3.Name from concert as T1 join singer_in_concert as T2 on T1.concert_ID = T2.concert_ID join singer as T3 on T2.Singer_ID = T3.Singer_ID where T1.Year = 1 Semantically equivalent join, different joining order and aliases
car_1 SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1; select T1.Model from model_list as T1 join car_names as T2 on T1.Model = T2.Model join cars_data as T3 on T2.MakeId = T3.Id order by T3.Horsepower asc limit 1 Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
concert_singer SELECT count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id ORDER BY T2.Capacity DESC LIMIT 1 SELECT count(*) FROM concert Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' SELECT Document_ID FROM Paragraphs WHERE Paragraph_Text = 1 INTERSECT SELECT Document_ID FROM Paragraphs WHERE Paragraph_Text like 1 If we plug in the value of 'Brazil' and 'Ireland', the two queries are semantically equivalent: like "Ireland" is semantically equiavalent to = Ireland if we keep the distinct key word our test suite is able to distinguish these two queries.
car_1 SELECT count(*) FROM CONTINENTS; SELECT Count(DISTINCT continents.Continent) FROM continents Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, and counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg( Age ) FROM Student WHERE StuID NOT in ( SELECT StuID FROM Has_Pet ) Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
student_transcripts_tracking SELECT count(DISTINCT department_id) FROM Degree_Programs select count ( distinct degree_programs.degree_summary_name ) from degree_programs Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, and counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
cre_Doc_Template_Mgt SELECT count(*) FROM Templates WHERE template_type_code = "CV" SELECT count( * ) FROM Ref_Template_Types JOIN Templates on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code WHERE Ref_Template_Types.Template_Type_Code = 1 Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
cre_Doc_Template_Mgt SELECT template_id , count(*) FROM Documents GROUP BY template_id select T2.Template_ID , count ( * ) from Templates as T1 join Documents as T2 on T1.Template_ID = T2.Template_ID group by T2.Template_ID Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result.
singer SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955 select singer.citizenship from singer where singer.birth_year > 1945 intersect select singer.citizenship from singer where singer.birth_year < 1955 After plugging the values into the right place (which means replacing the 1945 with 1955 and vice versa in the predicted query), since intersection is commutative, the resulting query is semantically equivalent if we do not plug in the value our method is able to distinguish these two queries.
pets_1 SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' select Pets.PetID from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID where Student.LName = " value " Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result.
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select min ( grade ) from highschooler where id not in ( select student_id from friend ) Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result.
concert_singer SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id select concert.concert_Name , concert.Theme , count(*) from singer_in_concert join singer on singer_in_concert.Singer_ID = singer.Singer_ID join concert on singer_in_concert.concert_ID = concert.concert_ID group by concert.concert_ID Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result.
car_1 SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1; SELECT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id ORDER BY T3.MPG DESC LIMIT 1 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result.
dog_kennels SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1 SELECT Dogs.name, Dogs.age, Dogs.weight FROM Dogs WHERE Dogs.abandoned_yn = 'terminal' AND Dogs.abandoned_yn = 'terminal' If we plug in the correct value 1 at both places, "= 1 and = 1" is semantically equivalent to "=1" if we do not plug in the value our method is likely to distinguish these two queries (we say likely because the prediction does not predict a real value, but only a place holder).
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT StuID FROM Has_Pet) Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
dog_kennels SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%' SELECT Professionals.role_code, Professionals.street, Professionals.state, Professionals.city FROM Professionals WHERE Professionals.city in (SELECT city FROM Professionals WHERE city like 1) Semantically equivalent rewrite of where condition, by checking membership in a set with the filtering where condition
car_1 SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'; SELECT count( * ) FROM countries AS T1 JOIN car_makers AS T2 ON T1.CountryId = T2.Country JOIN model_list AS T3 ON T2.Id = T3.Maker WHERE T1.CountryName = 'usa' Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
cre_Doc_Template_Mgt SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = "Robbin CV" select Documents.Document_ID , Templates.Template_ID , Documents.Document_Description from Documents join Templates on Documents.Template_ID = Templates.Template_ID where Documents.Document_Name = 'Robbin CV' Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
wta_1 SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1 SELECT T2.winner_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'australian open' ORDER BY T2.winner_rank_points DESC LIMIT 1 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
voter_1 SELECT count(*) FROM area_code_state SELECT Count(DISTINCT AREA_CODE_STATE.state) FROM AREA_CODE_STATE Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, and counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
network_1 SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend select highschooler.id from highschooler except select highschooler.id from highschooler join friend on highschooler.id = friend.student_id Semantically correct redundant join in the except clause of the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
student_transcripts_tracking SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1 SELECT Max(Transcripts.transcript_date) FROM Transcripts Max value is equivalent to sorting with descending order limit 1
car_1 SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1; select model_list.model from model_list join car_names on model_list.model = car_names.model group by model_list.model order by count ( * ) desc limit 1 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT StuID FROM Has_Pet) Semantically correct redundant join in the gold query. Joining with a parent & primary key will not change the result.
student_transcripts_tracking SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1 SELECT Max(Transcripts.transcript_date) FROM Transcripts Max value is equivalent to sorting with descending order limit 1
concert_singer SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30 SELECT Country FROM singer WHERE Age < 1 INTERSECT SELECT Country FROM singer WHERE Age > 1 After plugging the values into the right place (which means replacing the 40 with 30 and vice versa in the predicted query), since intersection is commutative, the resulting query is semantically equivalent
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2 select T1.Document_ID from Paragraphs as T1 join Documents as T2 on T1.Document_ID = T2.Document_ID group by T1.Document_ID having count ( * ) > = 1 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results. After plugging the values into the right place, two queries are semantically equivalent. if we do not plug in the value our method is likely to distinguish these two queries (we say likely because the prediction does not predict a real value, but only a place holder).
cre_Doc_Template_Mgt SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1 select T3.Template_ID , T2.Template_Type_Code from Templates as T1 join Ref_Template_Types as T2 on T1.Template_Type_Code = T2.Template_Type_Code join Documents as T3 on T1.Template_ID = T3.Template_ID group by T1.Template_ID order by count ( * ) desc limit 1 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
pets_1 SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' SELECT T1.Fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID WHERE T2.PetID in ( SELECT PetID FROM Pets WHERE PetType = 'cat' ) INTERSECT SELECT T1.Fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T3.PetType = 'dog' Semantically rewrite of the filtering where clause by filtering by a set membership intermediate column.
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1 select Documents.Document_ID from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID group by Documents.Document_ID order by count(*) asc limit 1 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
cre_Doc_Template_Mgt SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK" select Documents.Document_Name from Documents join Templates on Documents.Template_ID = Templates.Template_ID join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code where Ref_Template_Types.Template_Type_Code = 'BK' Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid SELECT count( * ) , Has_Pet.StuID FROM Has_Pet JOIN Pets on Has_Pet.PetID = Pets.PetID GROUP BY Has_Pet.StuID Semantically correct redundant join in the gold (student.stuid is parent) and in the prediction (Pets.PetID is parent). Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
museum_visit SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1 SELECT Museum_ID,Name FROM museum GROUP BY Museum_ID ORDER BY Num_of_Staff DESC LIMIT 1 Semantically correct redundant group by; group by all primary keys will not change the results.
voter_1 SELECT count(*) FROM area_code_state select count ( distinct state ) from area_code_state Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, and counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
wta_1 SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1 SELECT matches.winner_name, matches.winner_rank_points FROM matches JOIN players GROUP BY matches.winner_name ORDER BY count(*) DESC LIMIT 1 Redundant join without predicate will create a cartesian product of tables, and each row in matches will be repeated by (size of players table) times. Finding the max count after multiplying everything with the same scalar leads to the same result.
car_1 SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980; select distinct model_list.model from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model where cars_data.year > "value" Semantically equivalent join, different joining order.
dog_kennels SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2 select Professionals.professional_id , Professionals.cell_number from Treatments join Professionals on Treatments.professional_id = Professionals.professional_id join Treatment_Types on Treatments.treatment_type_code = Treatment_Types.treatment_type_code group by Professionals.professional_id having count(*) >= 2 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
cre_Doc_Template_Mgt SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID select distinct ref_template_types.template_type_description from Documents join Templates on Documents.Template_ID = Templates.Template_ID join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code Semantically equivalent join, different joining order.
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) select avg(Student.Age) from Student where Student.StuID not in ( select Has_Pet.StuID from Has_Pet ) Semantically rewrite of not in. Create a intermediate column of boolean. Semantically correct redundant join in the gold. Joining with a parent & primary key will not change the result.
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT Avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT Has_Pet.StuID FROM Has_Pet) Semantically rewrite of not in. Create a intermediate column of boolean. Semantically correct redundant join in the gold. Joining with a parent & primary key will not change the result.
cre_Doc_Template_Mgt SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code select distinct Ref_Template_Types.Template_Type_Code , count(*) from Templates join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code group by Ref_Template_Types.Template_Type_Code Semantically correct redundant join in the gold. Joining with a parent & primary key will not change the result.
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid select count ( * ) , StuID from Has_Pet group by StuID Semantically correct redundant join in the gold. Joining with a parent & primary key will not change the result.
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' select paragraphs.other_details from paragraphs where paragraphs.paragraph_text like ' value ' Our evaluation method replaces the value 1 in the prediction with the ground truth value "Korea". ' = "Korea"' is semantically equivalent to 'like "Korea"'. if we do not plug in the value our method is able to distinguish these two queries.
car_1 SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1; SELECT car_names.Model FROM model_list JOIN car_names on car_names.Model = model_list.Model JOIN cars_data on cars_data.Id = car_names.MakeId WHERE cars_data.Cylinders = 1 ORDER BY cars_data.Horsepower desc LIMIT 1 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results. (our evaluation method also replaces 1 in the predicted query with 4) if we do not plug in the value our method is able to distinguish these two queries.
cre_Doc_Template_Mgt SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3 select Ref_Template_Types.Template_Type_Code from Templates join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code group by Ref_Template_Types.Template_Type_Code having count(*) < 3 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
pets_1 SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' select T3.PetID from Student as T1 join Has_Pet as T2 on T1.StuID = T2.StuID join Pets as T3 on T2.PetID = T3.PetID where T1.LName = 1 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
voter_1 SELECT count(*) FROM area_code_state select count ( distinct area_code_state.state ) from area_code_state Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, and counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' select documents.document_id from paragraphs join documents on paragraphs.document_id = documents.document_id where paragraphs.paragraph_text = 'value' intersect select documents.document_id from paragraphs join documents on paragraphs.document_id = documents.document_id where paragraphs.paragraph_text = 'value' Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) select avg(Student.Age) from Student where Student.StuID not in ( select Has_Pet.StuID from Has_Pet ) Semantically correct redundant join in the gold. Joining with a parent & primary key will not change the result.
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' select tv_channel.id from tv_channel where tv_channel.id not in (select tv_channel.id from cartoon join tv_channel on cartoon.channel = tv_channel.idwhere cartoon.directed_by = 'value' ) Semantically correct redundant join in the except clause. Joining with a parent & primary key will not change the result.
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID select teacher.name , course.course from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID Semantically equivalent join, different joining order.
car_1 SELECT count(*) FROM CONTINENTS; SELECT Count(DISTINCT continents.Continent) FROM continents Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, and counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
cre_Doc_Template_Mgt SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT' select count(*) from Documents join Templates on Documents.Template_ID = Templates.Template_ID join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code where Ref_Template_Types.Template_Type_Code = 'PPT' Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
world_1 SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != "English" select country.Code from countrylanguage join country on countrylanguage.CountryCode = country.Code where countrylanguage.Language != 'English' Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match. Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results. if we keep the distinct key word our test suite is able to distinguish these two queries.
pets_1 SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 SELECT count( * ) FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T1.Age > 20 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
world_1 SELECT Name FROM country WHERE continent = "Europe" AND Population = "80000" SELECT T1.Name FROM country AS T1 WHERE T1.Continent = 1 and T1.Population between 1 AND 2 If we replace the values 1 and 2 both with the ground truth "80000" then "between 80000 and 80000" is semantically equivalent to "= 80000" if we do not plug in the value our method is likely to distinguish these two queries (we say likely because the prediction does not predict a real value, but only a place holder).
tvshow SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel; SELECT count( TV_Channel.series_name ) , count( * ) FROM TV_Channel Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, and counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
world_1 SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2 SELECT T1.Name,count( * ) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING count( * ) > 2 Counting different columns of the same "groups of tables" are semantically the same.
student_transcripts_tracking SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs SELECT Count(DISTINCT Degree_Programs.degree_program_id) FROM Degree_Programs Our evaluation method removes all distinct key word to maintain fair comparison with original exact set match; after removal, and counting different columns of the same table leads to the same result if we keep the distinct key word our test suite is able to distinguish these two queries.
flight_2 SELECT count(*) FROM FLIGHTS WHERE SourceAirport = "APG" select count ( * ) from flights where flights.sourceairport like " % apg % " Our evaluation method replaces the value "% ual %" in the prediction with the ground truth value "APG". ' = "APG"' is semantically equivalent to 'like "APG"'. if we do not plug in the value our method is able to distinguish these two queries.
wta_1 SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3 SELECT T2.winner_name,T2.winner_rank FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_age LIMIT 3 Semantically correct redundant join in the prediction. Joining with a parent & primary key will not change the result. Then counting the same column leads to the same results.
car_1 SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1; SELECT max(MPG) FROM cars_data WHERE Cylinders = 1 OR Year < 1 Max value is equivalent to sorting with descending order limit 1. (need to replace the placeholders "1" in the predictions )
car_1 SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1; SELECT max( MPG ) FROM cars_data WHERE Cylinders = 8 or Year < 1980
cre_Doc_Template_Mgt SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = "Data base" select T1.Template_Type_Code from Ref_Template_Types as T1 join Templates as T2 on T1.Template_Type_Code = T2.Template_Type_Code join Documents as T3 on T2.Template_ID = T3.Template_ID where T3.Document_Name = 1
pets_1 SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' select pets.petid from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID where student.lname = "value"
car_1 SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1; select model_list.model from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model order by cars_data.horsepower asc limit 1
car_1 SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'; SELECT count( * ) FROM countries JOIN car_makers on car_makers.Country = countries.CountryId JOIN model_list on model_list.Maker = car_makers.Id WHERE countries.CountryName = 1
car_1 SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo'; select avg(cars_data.edispl) from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model where model_list.model = "value"
cre_Doc_Template_Mgt SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = "Robbin CV" select documents.document_id , templates.template_id , documents.document_description from documents join templates on documents.template_id = templates.template_id where documents.document_name = ' value '
tvshow SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by SELECT count(T1.Title), T1.Directed_by FROM Cartoon AS T1 GROUP BY T1.Directed_by
cre_Doc_Template_Mgt SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1 SELECT Ref_Template_Types.Template_Type_Code FROM Ref_Template_Types JOIN Templates on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code JOIN Documents on Documents.Template_ID = Templates.Template_ID GROUP BY Ref_Template_Types.Template_Type_Code ORDER BY count( * ) desc LIMIT 1
wta_1 SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1 SELECT T2.loser_name,T2.winner_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.minutes DESC LIMIT 1
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2 select T1.Document_ID from Paragraphs as T1 join Documents as T2 on T1.Document_ID = T2.Document_ID group by T1.Document_ID having count ( * ) between 1 and 1
flight_2 SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = "Aberdeen" AND T3.Airline = "United Airlines" SELECT count( * ) FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.Airline JOIN airports AS T3 ON T2.DestAirport = T3.AirportCode WHERE T3.City = 'aberdeen' and T1.Airline = 'united airlines'
world_1 SELECT count(*) FROM country WHERE GovernmentForm = "Republic" select count ( GovernmentForm ) from country where GovernmentForm = 1
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT Avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT Has_Pet.StuID FROM Has_Pet)
cre_Doc_Template_Mgt SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT' select count(*) from Documents join Templates on Documents.Template_ID = Templates.Template_ID join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code where Ref_Template_Types.Template_Type_Code = 'PPT'
car_1 SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company'; select distinct model_list.Model from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model join car_makers on model_list.Maker = car_makers.Id where cars_data.Weight < 3500 and car_makers.FullName != 'Ford Motor Company'
student_transcripts_tracking SELECT count(DISTINCT department_id) FROM Degree_Programs select count( distinct degree_programs.degree_summary_name) from Degree_Programs
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name select teacher.Name , course.Course from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID order by teacher.Name asc
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 select countrylanguage.Language from countrylanguage join country on countrylanguage.CountryCode = country.Code group by countrylanguage.Language order by count(*) desc limit 1
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT StuID FROM Has_Pet)
network_1 SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT Avg(Highschooler.grade) FROM Highschooler WHERE Highschooler.ID IN (SELECT Friend.student_id FROM Friend)
car_1 SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'; select car_makers.Maker from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model join car_makers on model_list.Maker = car_makers.Id where cars_data.Year = "value"
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' select tv_channel.id from TV_Channel where tv_channel.id not in (select tv_channel.id from Cartoon join TV_Channel on Cartoon.Channel = TV_Channel.id where cartoon.directed_by = "value" )
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' SELECT Paragraphs.Other_Details FROM Paragraphs WHERE Paragraphs.Paragraph_Text LIKE 'terminal'
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM country JOIN countrylanguage GROUP BY countrylanguage.Language ORDER BY Count(*) Desc LIMIT 1
orchestra SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC SELECT T1.Major_Record_Format FROM orchestra AS T1 JOIN performance AS T3 GROUP BY T1.Major_Record_Format ORDER BY count(*) ASC
dog_kennels SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs ) select count ( * ) from owners where not ( owners.owner_id in ( select dogs.owner_id from dogs ) )
concert_singer SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1 select stadium.name , stadium.capacity from stadium group by stadium.Stadium_ID order by avg(stadium.average) desc limit 1
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID select teacher.Name , course.Course from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID
car_1 SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1; SELECT T3.Cylinders FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T1.Model = 'volvo' ORDER BY T3.Accelerate LIMIT 1
cre_Doc_Template_Mgt SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1 SELECT Ref_Template_Types.Template_Type_Code FROM Ref_Template_Types JOIN Templates on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code JOIN Documents on Documents.Template_ID = Templates.Template_ID GROUP BY Ref_Template_Types.Template_Type_Code ORDER BY count( * ) desc LIMIT 1
network_1 SELECT student_id , count(*) FROM Friend GROUP BY student_id select count ( * ) , friend.student_id from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id
car_1 SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'; SELECT count( * ) FROM countries JOIN car_makers on car_makers.Country = countries.CountryId JOIN model_list on model_list.Maker = car_makers.Id WHERE countries.CountryName = 1
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' SELECT Paragraphs.Other_Details FROM Paragraphs WHERE Paragraphs.Paragraph_Text like 1
pets_1 SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' select Pets.PetID from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID where Student.LName = 'Smith'
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' select id from TV_Channel except select T1.id from TV_Channel as T1 join Cartoon as T2 on T1.id = T2.Channel where T2.Directed_by = 1
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2 SELECT Documents.Document_ID FROM Documents JOIN Paragraphs on Paragraphs.Document_ID = Documents.Document_ID GROUP BY Paragraphs.Document_ID HAVING count( * ) between 1 and 2
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1 select T2.Document_ID from Documents as T1 join Paragraphs as T2 on T1.Document_ID = T2.Document_ID group by T2.Document_ID order by count ( * ) asc limit 1
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid select count(*) , has_pet.stuid from Has_Pet group by has_pet.stuid
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' select Documents.Document_ID from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID where Paragraphs.Paragraph_Text = 'Brazil' intersect select Documents.Document_ID from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID where Paragraphs.Paragraph_Text = 'Ireland'
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM countrylanguage JOIN country GROUP BY countrylanguage.Language ORDER BY COUNT(*) DESC LIMIT 1
course_teach SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" select teacher.name from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID where course.course = "value"
voter_1 SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1 select T2.contestant_number , T1.contestant_name from CONTESTANTS as T1 join VOTES as T2 on T1.contestant_number = T2.contestant_number group by T1.contestant_number , T1.contestant_name order by count ( * ) asc limit 1
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' select tv_channel.id from tv_channel where tv_channel.id not in (select tv_channel.id from cartoon join tv_channel on cartoon.channel = tv_channel.idwhere cartoon.directed_by = 'value' )
course_teach SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" select teacher.Name from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID where course.Course = " value "
orchestra SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance) select orchestra.orchestra from orchestra where not ( orchestra.orchestra_id in ( select performance.orchestra_id from performance ) )
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name SELECT teacher.Name, course.Course FROM course_arrange JOIN teacher ON course_arrange.Teacher_ID = teacher.Teacher_ID JOIN course ON course_arrange.Course_ID = course.Course_ID ORDER BY teacher.Name Asc
dog_kennels SELECT count(DISTINCT professional_id) FROM Treatments SELECT count( Treatments.professional_id ) FROM Dogs JOIN Treatments on Treatments.dog_id = Dogs.dog_id
course_teach SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" select teacher.Name from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID where course.Course = " value "
voter_1 SELECT count(*) FROM area_code_state SELECT count(state) FROM AREA_CODE_STATE
tvshow SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1; SELECT TV_Channel.Language , count( * ) FROM TV_Channel GROUP BY TV_Channel.Language ORDER BY count( TV_Channel.Language ) asc LIMIT 1
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 select countrylanguage.language from countrylanguage join country on countrylanguage.CountryCode = country.Code group by countrylanguage.language order by count(*) desc limit 1
pets_1 SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') SELECT Student.Major, Student.Age FROM Student WHERE Student.StuID NOT IN (SELECT Student.StuID FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = 1)
cre_Doc_Template_Mgt SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1 SELECT Ref_Template_Types.Template_Type_Code FROM Ref_Template_Types JOIN Templates on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code GROUP BY Templates.Template_Type_Code ORDER BY count( * ) desc LIMIT 1
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT Min(Highschooler.grade) FROM Highschooler WHERE Highschooler.ID NOT IN (SELECT Friend.student_id FROM Friend)
cre_Doc_Template_Mgt SELECT count(*) FROM Templates WHERE template_type_code = "CV" select count(*) from Templates join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code where Ref_Template_Types.Template_Type_Code = 'cv'
concert_singer SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id select singer.Name , count(*) from singer_in_concert join singer on singer_in_concert.Singer_ID = singer.Singer_ID join concert on singer_in_concert.concert_ID = concert.concert_ID group by singer.Singer_ID
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid select count ( * ) , StuID from Has_Pet group by StuID
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name SELECT teacher.Name, course.Course FROM course_arrange JOIN teacher ON course_arrange.Teacher_ID = teacher.Teacher_ID JOIN course ON course_arrange.Course_ID = course.Course_ID ORDER BY teacher.Name Asc
network_1 SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT Avg(Highschooler.grade) FROM Highschooler WHERE Highschooler.ID IN (SELECT Friend.student_id FROM Friend)
student_transcripts_tracking SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor' select Semesters.semester_id from Student_Enrolment join Semesters on Student_Enrolment.semester_id = Semesters.semester_id join Degree_Programs on Student_Enrolment.degree_program_id = Degree_Programs.degree_program_id where Degree_Programs.degree_summary_name = 'Master' intersect select Semesters.semester_id from Student_Enrolment join Semesters on Student_Enrolment.semester_id = Semesters.semester_id join Degree_Programs on Student_Enrolment.degree_program_id = Degree_Programs.degree_program_id where Degree_Programs.degree_summary_name = 'Bachelor'
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID select T1.Name , T3.Course from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID
course_teach SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" select teacher.name from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID where course.course = "value"
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1 SELECT Documents.Document_ID FROM Documents JOIN Paragraphs on Paragraphs.Document_ID = Documents.Document_ID GROUP BY Paragraphs.Document_ID ORDER BY count( * ) asc LIMIT 1
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM countrylanguage JOIN country GROUP BY countrylanguage.Language ORDER BY COUNT(*) DESC LIMIT 1
pets_1 SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') SELECT Student.Major, Student.Age FROM Student WHERE Student.StuID NOT IN (SELECT Student.StuID FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = 1)
cre_Doc_Template_Mgt SELECT template_id , version_number , template_type_code FROM Templates select Templates.Template_ID , Templates.Version_Number , Templates.Template_Type_Code from Templates group by Templates.Template_ID
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 select countrylanguage.Language from countrylanguage join country on countrylanguage.CountryCode = country.Code group by countrylanguage.Language order by count ( * ) desc limit 1
course_teach SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name select teacher.Name , count(*) from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID group by teacher.Name
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1 SELECT Documents.Document_ID FROM Documents JOIN Paragraphs on Paragraphs.Document_ID = Documents.Document_ID GROUP BY Paragraphs.Document_ID ORDER BY count( * ) asc LIMIT 1
museum_visit SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit) select museum.name from museum where not ( museum.museum_id in ( select visit.museum_id from visit ) )
cre_Doc_Template_Mgt SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1 select Templates.Template_ID from Documents join Templates on Documents.Template_ID = Templates.Template_ID group by Templates.Template_ID having count(*) > 1
museum_visit SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010) select count(*) from visitor where visitor.id not in (select visitor.ID from visit join visitor on visit.visitor_ID = visitor.ID join museum on visit.Museum_ID = museum.Museum_ID where museum.open_year > "value" )
battle_death SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' ); select count ( * ) from battle where not ( battle.id in ( select ship.lost_in_battle from ship where ship.tonnage = " 225 " ) )
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid select count(*) , Student.StuID from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID group by Student.StuID
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' select Documents.Document_ID from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID where Paragraphs.Paragraph_Text = 'Brazil' intersect select Documents.Document_ID from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID where Paragraphs.Paragraph_Text = 'Ireland'
flight_2 SELECT Country FROM AIRLINES WHERE Airline = "JetBlue Airways" select country from airlines where airline = 1 and airline = 1
pets_1 SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 select count(*) from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID where Student.Age > 20
world_1 SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese" SELECT count( * ) FROM countrylanguage WHERE Language = 'chinese'
dog_kennels SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%' SELECT Owners.first_name, Owners.last_name, Owners.email_address FROM Owners WHERE Owners.state in (SELECT state FROM Owners WHERE state like 1)
car_1 SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1; select T1.Model from model_list as T1 join car_names as T2 on T1.Model = T2.Model join cars_data as T3 on T2.MakeId = T3.Id order by T3.Horsepower asc limit 1
pets_1 SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' SELECT Student.StuID FROM Student EXCEPT SELECT Has_Pet.StuID FROM Has_Pet JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = 'terminal'
dog_kennels SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1 select owners.owner_id , owners.last_name from Treatments join Dogs on Treatments.dog_id = Dogs.dog_id join Owners on Dogs.owner_id = Owners.owner_id group by Owners.owner_id order by count(*) desc limit 1
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select min ( grade ) from Highschooler where ID not in ( select student_id from Friend )
dog_kennels SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id select professionals.professional_id , professionals.role_code , professionals.email_address from Professionals where professionals.professional_id not in (select Treatments.professional_id from Treatments )
pets_1 SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 select count(*) from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID where student.age > "value"
student_transcripts_tracking SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs SELECT count(T1.degree_program_id) FROM Degree_Programs AS T1
tvshow SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr"; SELECT count(Title) FROM Cartoon WHERE Written_by = 1
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) select avg(student.age) from Student where student.stuid not in (select Has_Pet.StuID from Has_Pet )
pets_1 SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' select StuID from Student except select T2.StuID from Pets as T1 join Has_Pet as T2 on T1.PetID = T2.PetID where T1.PetType = 1
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select min ( grade ) from Highschooler where ID not in ( select student_id from Friend )
cre_Doc_Template_Mgt SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE "%w%" select documents.document_name , documents.template_id from documents join templates on documents.template_id = templates.template_id where documents.document_description like ' value '
car_1 SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company'; select model_list.Model from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model join car_makers on model_list.Maker = car_makers.Id where cars_data.Weight < 3500 and car_makers.FullName != 'Ford Motor Company'
dog_kennels SELECT count(DISTINCT professional_id) FROM Treatments select count(*) from Treatments join Professionals on Treatments.professional_id = Professionals.professional_id
orchestra SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003 SELECT orchestra.Record_Company FROM performance JOIN orchestra WHERE orchestra.Year_of_Founded < 'terminal' INTERSECT SELECT orchestra.Record_Company FROM orchestra WHERE orchestra.Year_of_Founded > 'terminal'
student_transcripts_tracking SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id select Courses.course_name from Student_Enrolment_Courses join Student_Enrolment on Student_Enrolment_Courses.student_enrolment_id = Student_Enrolment.student_enrolment_id join Courses on Student_Enrolment_Courses.course_id = Courses.course_id
cre_Doc_Template_Mgt SELECT version_number , template_type_code FROM Templates WHERE version_number > 5 select templates.version_number , templates.template_type_code from templates join ref_template_types on templates.template_type_code = ref_template_types.template_type_code where templates.version_number > ' value '
employee_hire_evaluation SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 SELECT shop.District FROM shop WHERE shop.Number_products > 'terminal' INTERSECT SELECT shop.District FROM shop WHERE shop.Number_products < 'terminal'
cre_Doc_Template_Mgt SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1 select T1.Template_Type_Code from Templates as T1 join Ref_Template_Types as T2 on T1.Template_Type_Code = T2.Template_Type_Code group by T1.Template_Type_Code order by count ( * ) desc limit 1
voter_1 SELECT count(*) FROM area_code_state select count ( state ) from AREA_CODE_STATE
pets_1 SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' SELECT T3.PetID FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T1.LName = 'Smith'
pets_1 SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1 select Student.Fname , Student.Sex from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID group by Student.StuID having count(*) > 1
cre_Doc_Template_Mgt SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1 select Ref_Template_Types.Template_Type_Code from Documents join Templates on Documents.Template_ID = Templates.Template_ID join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code group by Ref_Template_Types.Template_Type_Code order by count(*) desc limit 1
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg( Student.Age ) FROM Student WHERE Student.StuID not in ( SELECT Has_Pet.StuID FROM Has_Pet )
world_1 SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese" SELECT count( * ) FROM countrylanguage WHERE Language = 'Chinese'
world_1 SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa" select count(*) from country where country.Continent = " value "
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2 select Documents.Document_ID from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID group by Documents.Document_ID having count(*) between 1 and 2
voter_1 SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Kelly Clauss' SELECT T1.area_code FROM AREA_CODE_STATE AS T1 JOIN VOTES AS T2 ON T1.state = T2.state JOIN CONTESTANTS AS T3 ON T2.contestant_number = T3.contestant_number WHERE T3.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T1.area_code FROM AREA_CODE_STATE AS T1 JOIN VOTES AS T2 ON T1.state = T2.state JOIN CONTESTANTS AS T3 ON T2.contestant_number = T3.contestant_number WHERE T3.contestant_name = ''
employee_hire_evaluation SELECT count(*) FROM employee SELECT count(Employee_ID) FROM employee
pets_1 SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 SELECT count( * ) FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T1.Age > 20
car_1 SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980; select T3.Model from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId join model_list as T3 on T2.Model = T3.Model where T1.Year > 1
wta_1 SELECT avg(loser_age) , avg(winner_age) FROM matches select avg(matches.loser_age) , avg(matches.winner_age) from matches join players on matches.winner_id = players.player_id
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2 select Documents.Document_ID from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID group by Documents.Document_ID having count(*) between 1 and 2
world_1 SELECT Name FROM country WHERE continent = "Europe" AND Population = "80000" select Name from country where Continent = 1 and Population like 1
pets_1 SELECT petid , weight FROM pets WHERE pet_age > 1 select petid , weight from pets where pet_age > 1 group by petid
concert_singer SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id select concert.concert_Name , concert.Theme , count(*) from singer_in_concert join singer on singer_in_concert.Singer_ID = singer.Singer_ID join concert on singer_in_concert.concert_ID = concert.concert_ID group by concert.concert_ID
dog_kennels SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1 select name , age , weight from Dogs where abandoned_yn = 1 and abandoned_yn = 1
dog_kennels SELECT count(DISTINCT professional_id) FROM Treatments SELECT Count(*) FROM Treatments
pets_1 SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 select count(*) from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID where Student.Age > " value "
cre_Doc_Template_Mgt SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1 select T2.Template_Type_Code from Templates as T1 join Ref_Template_Types as T2 on T1.Template_Type_Code = T2.Template_Type_Code join Documents as T3 on T1.Template_ID = T3.Template_ID group by T1.Template_Type_Code order by count ( * ) desc limit 1
tvshow SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel; SELECT Count(DISTINCT TV_Channel.series_name), Count(DISTINCT TV_Channel.series_name) FROM TV_Channel
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2 SELECT Documents.Document_ID FROM Documents JOIN Paragraphs on Paragraphs.Document_ID = Documents.Document_ID GROUP BY Paragraphs.Document_ID HAVING count( * ) between 1 and 2
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid select count(*) , has_pet.stuid from Has_Pet join Pets on Has_Pet.PetID = Pets.PetID group by has_pet.stuid
car_1 SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders; SELECT max( Accelerate ),max( Cylinders ) FROM cars_data GROUP BY Cylinders
student_transcripts_tracking SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2 select Transcripts.transcript_date , Transcripts.transcript_id from Transcript_Contents join Student_Enrolment_Courses on Transcript_Contents.student_course_id = Student_Enrolment_Courses.student_course_id join Courses on Student_Enrolment_Courses.course_id = Courses.course_id join Transcripts on Transcript_Contents.transcript_id = Transcripts.transcript_id group by Transcripts.transcript_id having count(*) >= 2
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2 select Documents.Document_ID from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID group by Documents.Document_ID having count(*) >= 2
pets_1 SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 select count(*) from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID where Student.Age > 20
course_teach SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name SELECT T3.Name,count( * ) FROM course AS T1 JOIN course_arrange AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T2.Teacher_ID = T3.Teacher_ID GROUP BY T3.Name
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT min( Highschooler.grade ) FROM Highschooler WHERE Highschooler.ID not in ( SELECT Friend.student_id FROM Friend )
pets_1 SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' SELECT Student.StuID FROM Student EXCEPT SELECT Has_Pet.StuID FROM Has_Pet JOIN Pets on Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = 1
flight_2 SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.DestAirport = "ASY" select count(*) from flights join airports on flights.DestAirport = airports.AirportCode join airlines on flights.Airline = airlines.uid where airlines.Airline = 'united airlines' and airports.AirportCode = 'ASY'
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM countrylanguage JOIN country GROUP BY countrylanguage.Language ORDER BY COUNT(*) DESC LIMIT 1
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) select avg ( Age ) from Student where StuID not in ( select StuID from Has_Pet )
car_1 SELECT count(*) FROM CARS_DATA WHERE horsepower > 150; SELECT count( * ) FROM car_names JOIN cars_data on cars_data.Id = car_names.MakeId WHERE cars_data.Horsepower > 1
orchestra SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC SELECT orchestra.Major_Record_Format FROM orchestra JOIN performance GROUP BY orchestra.Major_Record_Format ORDER BY count(*) ASC
student_transcripts_tracking SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs SELECT count(T1.degree_program_id) FROM Degree_Programs AS T1
dog_kennels SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments ) select count ( * ) from dogs where not ( dogs.dog_id in ( select treatments.dog_id from treatments ) )
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' select T2.Document_ID from Paragraphs as T1 join Documents as T2 on T1.Document_ID = T2.Document_ID where T1.Paragraph_Text = 1 intersect select Document_ID from Paragraphs where Paragraph_Text = 1
car_1 SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat'; select countries.countryid , countries.countryname from car_makers join countries on car_makers.Country = countries.CountryId group by countries.CountryId having count(*) > "value" union select countries.countryid , countries.countryname from model_list join car_makers on model_list.Maker = car_makers.Id join countries on car_makers.Country = countries.CountryId where model_list.model = "value" group by countries.CountryId
dog_kennels SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1 SELECT Dogs.name , Dogs.age , Dogs.weight FROM Dogs WHERE Dogs.abandoned_yn = 1 INTERSECT SELECT Dogs.name , Dogs.age , Dogs.weight FROM Dogs WHERE Dogs.abandoned_yn = 1
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select min ( grade ) from Highschooler where ID not in ( select student_id from Friend )
world_1 SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese" SELECT count( * ) FROM countrylanguage WHERE Language = 'chinese'
pets_1 SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' SELECT Student.Fname FROM Pets JOIN Has_Pet ON Pets.PetID = Has_Pet.PetID JOIN Student ON Has_Pet.StuID = Student.StuID WHERE Pets.PetType = 'terminal' INTERSECT SELECT Student.Fname FROM Pets JOIN Has_Pet ON Pets.PetID = Has_Pet.PetID JOIN Student ON Has_Pet.StuID = Student.StuID WHERE Pets.PetType = 'terminal'
concert_singer SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert) select stadium.name from stadium where not ( stadium.stadium_id in ( select concert.stadium_id from concert ) )
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT min( grade ) FROM Highschooler WHERE ID NOT IN ( SELECT student_id FROM Friend )
car_1 SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1; select max ( cars_data.mpg ) from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.cylinders = ' value ' or cars_data.year < ' value '
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' SELECT Other_Details FROM Paragraphs WHERE Paragraph_Text like '%Korea%'
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name select teacher.name , course.course from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID order by teacher.name asc
wta_1 SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1 SELECT T2.winner_name,T2.loser_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.minutes DESC LIMIT 1
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' select other_details from paragraphs where paragraph_text like 1
car_1 SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'; select car_makers.maker from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model join car_makers on model_list.Maker = car_makers.Id where cars_data.year = "value"
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' SELECT Paragraphs.Other_Details FROM Paragraphs WHERE Paragraphs.Paragraph_Text LIKE 'terminal'
pets_1 SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' select T3.PetID from Student as T1 join Has_Pet as T2 on T1.StuID = T2.StuID join Pets as T3 on T2.PetID = T3.PetID where T1.LName = 1
student_transcripts_tracking SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id select courses.course_name from Student_Enrolment_Courses join Student_Enrolment on Student_Enrolment_Courses.student_enrolment_id = Student_Enrolment.student_enrolment_id join Courses on Student_Enrolment_Courses.course_id = Courses.course_id
concert_singer SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1 select stadium.name , stadium.capacity from stadium group by stadium.Stadium_ID order by avg(stadium.average) desc limit 1
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM country JOIN countrylanguage GROUP BY countrylanguage.Language ORDER BY Count(*) Desc LIMIT 1
course_teach SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2 select teacher.Name from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID group by teacher.Name having count(*) >= 2
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg( Age ) FROM Student WHERE StuID NOT in ( SELECT StuID FROM Has_Pet )
network_1 SELECT name , grade FROM Highschooler select Highschooler.name , Highschooler.grade from Highschooler group by Highschooler.ID
car_1 SELECT count(*) FROM CARS_DATA WHERE horsepower > 150; select count ( * ) from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId where T1.Horsepower > 1
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID select T1.Name , T3.Course from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID
pets_1 SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid select Student.Fname , Student.Age from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID
course_teach SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name select teacher.Name , count(*) from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID group by teacher.Name
network_1 SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT avg( grade ) FROM Highschooler WHERE ID IN ( SELECT student_id FROM Friend )
cre_Doc_Template_Mgt SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents SELECT T1.Template_ID FROM Templates AS T1 EXCEPT SELECT T2.Template_ID FROM Documents AS T2 JOIN Templates AS T3
flight_2 SELECT Airline FROM AIRLINES WHERE Abbreviation = "UAL" select airlines.airline from airlines where airlines.abbreviation like " % ual % "
dog_kennels SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id select professionals.professional_id , professionals.role_code , professionals.email_address from Professionals where professionals.professional_id not in (select Treatments.professional_id from Treatments )
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name select T1.Name , T3.Course from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID order by T1.Name
world_1 SELECT Name FROM country WHERE continent = "Europe" AND Population = "80000" SELECT T1.Name FROM country AS T1 WHERE T1.Continent = 1 and T1.Population between 1 AND 2
car_1 SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'; SELECT count( * ) FROM countries JOIN car_makers on car_makers.Country = countries.CountryId JOIN model_list on model_list.Maker = car_makers.Id WHERE countries.CountryName = 1
world_1 SELECT count(*) FROM country WHERE GovernmentForm = "Republic" SELECT count(*) FROM country AS T1 WHERE T1.GovernmentForm like 1
pets_1 SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 SELECT Count(*) FROM Pets JOIN Has_Pet ON Pets.PetID = Has_Pet.PetID JOIN Student ON Has_Pet.StuID = Student.StuID WHERE Student.Age > 'terminal'
pets_1 SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' select T3.PetID from Student as T1 join Has_Pet as T2 on T1.StuID = T2.StuID join Pets as T3 on T2.PetID = T3.PetID where T1.LName = 1
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' select documents.document_id from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID where paragraphs.paragraph_text = "value" intersect select documents.document_id from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID where paragraphs.paragraph_text = "value"
dog_kennels SELECT DISTINCT breed_code , size_code FROM dogs SELECT Dogs.breed_code , Sizes.size_code FROM Sizes JOIN Dogs on Dogs.size_code = Sizes.size_code
cre_Doc_Template_Mgt SELECT count(*) FROM Templates WHERE template_type_code = "CV" SELECT count( * ) FROM Ref_Template_Types JOIN Templates on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code WHERE Ref_Template_Types.Template_Type_Code = 1
cre_Doc_Template_Mgt SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show' SELECT count( Paragraphs.Paragraph_Text ) FROM Documents JOIN Paragraphs on Paragraphs.Document_ID = Documents.Document_ID WHERE Documents.Document_Name = 1
car_1 SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders; SELECT max( Accelerate ),max( Cylinders ) FROM cars_data GROUP BY Cylinders
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT StuID FROM Has_Pet)
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT Avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT Has_Pet.StuID FROM Has_Pet)
dog_kennels SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id select T3.first_name , T3.last_name , T1.size_code from Sizes as T1 join Dogs as T2 on T1.size_code = T2.size_code join Owners as T3 on T2.owner_id = T3.owner_id
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' select T2.Document_ID from Paragraphs as T1 join Documents as T2 on T1.Document_ID = T2.Document_ID where T1.Paragraph_Text = 1 intersect select Document_ID from Paragraphs where Paragraph_Text = 1
cre_Doc_Template_Mgt SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID select distinct Ref_Template_Types.Template_Type_Description from Documents join Templates on Documents.Template_ID = Templates.Template_ID join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code
network_1 SELECT student_id , count(*) FROM Friend GROUP BY student_id select count(*) , Friend.student_id from Highschooler join Friend on Highschooler.ID = Friend.student_id group by Friend.student_id
museum_visit SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010) SELECT count(*) FROM visitor WHERE visitor.ID NOT IN (SELECT visitor.ID FROM visitor JOIN visit ON visitor.ID = visit.visitor_ID JOIN museum ON visit.Museum_ID = museum.Museum_ID WHERE museum.Open_Year > 1)
car_1 SELECT count(*) FROM CONTINENTS; SELECT Count(DISTINCT continents.Continent) FROM continents
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg(T1.Age) FROM Student AS T1 WHERE T1.StuID NOT IN (SELECT T2.StuID FROM Has_Pet AS T2 )
student_transcripts_tracking SELECT count(DISTINCT current_address_id) FROM Students select count(*) from Students join Addresses on Students.permanent_address_id = Addresses.address_id
cre_Doc_Template_Mgt SELECT count(*) FROM Templates WHERE template_type_code = "CV" select count ( distinct template_type_code ) from templates where template_type_code = 1
student_transcripts_tracking SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs SELECT count(*) FROM Degree_Programs
car_1 SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'; select T4.Maker from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId join model_list as T3 on T2.Model = T3.Model join car_makers as T4 on T3.Maker = T4.Id where T1.Year = 1
concert_singer SELECT count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id ORDER BY T2.Capacity DESC LIMIT 1 SELECT count(*) FROM concert ORDER BY count(*) DESC LIMIT 1
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid SELECT count( * ),StuID FROM Has_Pet GROUP BY StuID
pets_1 SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') select Major , Age from Student where StuID not in ( select T2.StuID from Pets as T1 join Has_Pet as T2 on T1.PetID = T2.PetID where T1.PetType = 1 )
dog_kennels SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1 SELECT name, age, weight FROM Dogs WHERE abandoned_yn like 1 INTERSECT SELECT name, age, weight FROM Dogs WHERE abandoned_yn like 1
museum_visit SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1 SELECT Museum_ID,Name FROM museum GROUP BY Museum_ID ORDER BY Num_of_Staff DESC LIMIT 1
pets_1 SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' select Pets.PetID from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID where Student.LName = 'Smith'
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT Min(Highschooler.grade) FROM Highschooler WHERE Highschooler.ID NOT IN (SELECT Friend.student_id FROM Friend)
student_transcripts_tracking SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2 select Transcripts.transcript_date , Transcripts.transcript_id from Transcript_Contents join Student_Enrolment_Courses on Transcript_Contents.student_course_id = Student_Enrolment_Courses.student_course_id join Courses on Student_Enrolment_Courses.course_id = Courses.course_id join Transcripts on Transcript_Contents.transcript_id = Transcripts.transcript_id group by Transcripts.transcript_id having count(*) >= 2
cre_Doc_Template_Mgt SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID select distinct ref_template_types.template_type_description from Documents join Templates on Documents.Template_ID = Templates.Template_ID join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code
museum_visit SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1 select Museum_ID , Name from museum group by Museum_ID order by sum ( Num_of_Staff ) desc limit 1
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg(T1.Age) FROM Student AS T1 WHERE T1.StuID NOT IN (SELECT T2.StuID FROM Has_Pet AS T2 )
cre_Doc_Template_Mgt SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT' SELECT count( * ) FROM Ref_Template_Types JOIN Templates on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code JOIN Documents on Documents.Template_ID = Templates.Template_ID WHERE Ref_Template_Types.Template_Type_Code = 1
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid select count(*) , Student.StuID from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID group by Student.StuID
cre_Doc_Template_Mgt SELECT template_id , count(*) FROM Documents GROUP BY template_id select Templates.Template_ID , count(*) from Documents join Templates on Documents.Template_ID = Templates.Template_ID group by Templates.Template_ID
world_1 SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1 select country.name , country.population , country.headofstate from country where country.surfacearea = (select max(country.surfacearea) from country order by country.surfacearea desc limit 1 )
museum_visit SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011 SELECT T3.Name FROM museum AS T1 JOIN visit AS T2 ON T1.Museum_ID = T2.Museum_ID JOIN visitor AS T3 ON T2.visitor_ID = T3.ID WHERE T1.Open_Year < '2009' INTERSECT SELECT T3.Name FROM museum AS T1 JOIN visit AS T2 ON T1.Museum_ID = T2.Museum_ID JOIN visitor AS T3 ON T2.visitor_ID = T3.ID WHERE T1.Open_Year > '2011'
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' select T2.Document_ID from Paragraphs as T1 join Documents as T2 on T1.Document_ID = T2.Document_ID where T1.Paragraph_Text = 1 intersect select T4.Document_ID from Paragraphs as T3 join Documents as T4 on T3.Document_ID = T4.Document_ID where T3.Paragraph_Text = 1
dog_kennels SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%' SELECT Owners.first_name, Owners.last_name, Owners.email_address FROM Owners WHERE Owners.state in (SELECT state FROM Owners WHERE state like 1)
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg( Age ) FROM Student WHERE StuID NOT IN ( SELECT StuID FROM Has_Pet )
dog_kennels SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id select Professionals.professional_id , Professionals.role_code , Professionals.email_address from Professionals where professionals.professional_id not in (select Treatments.professional_id from Treatments )
voter_1 SELECT count(*) FROM area_code_state SELECT count(T1.state) FROM AREA_CODE_STATE AS T1
car_1 SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500; select distinct model_list.Model from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model join car_makers on model_list.Maker = car_makers.Id where car_makers.FullName = 'General Motors' or cars_data.Weight > 3500
dog_kennels SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1 SELECT Dogs.name, Dogs.age, Dogs.weight FROM Dogs WHERE Dogs.abandoned_yn LIKE 'terminal'
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID select teacher.name , course.course from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID
car_1 SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6; select count(*) from cars_data join car_names on cars_data.Id = car_names.MakeId where cars_data.Cylinders > " value "
world_1 SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa" select count(*) from country where country.continent = "value"
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' select documents.document_id from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID where paragraphs.paragraph_text = "value" intersect select documents.document_id from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID where paragraphs.paragraph_text = "value"
pets_1 SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' select T3.PetID from Student as T1 join Has_Pet as T2 on T1.StuID = T2.StuID join Pets as T3 on T2.PetID = T3.PetID where T1.LName = 1
car_1 SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1; SELECT car_names.Model FROM model_list JOIN car_names on car_names.Model = model_list.Model JOIN cars_data on cars_data.Id = car_names.MakeId WHERE cars_data.Cylinders = 1 ORDER BY cars_data.Horsepower desc LIMIT 1
car_1 SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1; SELECT max(MPG) FROM cars_data WHERE Cylinders = 1 OR Year < 1
dog_kennels SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id SELECT T1.professional_id, T1.role_code, T1.email_address FROM Professionals AS T1 WHERE T1.professional_id NOT IN (SELECT T2.professional_id FROM Treatments AS T2 )
world_1 SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa" SELECT count(*) FROM country WHERE Continent = 1
course_teach SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" select T1.Name from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID where T3.Course = 1
voter_1 SELECT count(*) FROM area_code_state SELECT count(state) FROM AREA_CODE_STATE
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' SELECT TV_Channel.id FROM TV_Channel EXCEPT SELECT Cartoon.Channel FROM TV_Channel JOIN Cartoon on Cartoon.Channel = TV_Channel.id WHERE Cartoon.Directed_by = 1
car_1 SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3; select countries.countryname from car_makers join countries on car_makers.Country = countries.CountryId join continents on countries.Continent = continents.ContId where continents.continent = "value" group by countries.countryname having count(*) >= "value"
car_1 SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6; select count(*) from cars_data join car_names on cars_data.Id = car_names.MakeId where cars_data.Cylinders > "value"
museum_visit SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010) select count(*) from visitor where visitor.id not in (select visit.visitor_ID from visit join museum on visit.Museum_ID = museum.Museum_ID where museum.Open_Year > 2010 )
pets_1 SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' select pets.petid from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID where student.lname = "value"
tvshow SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = "A Love of a Lifetime"; select TV_Channel.series_name from TV_series join TV_Channel on TV_series.Channel = TV_Channel.id where TV_series.Episode like "value"
car_1 SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent; select continents.continent , count(*) from car_makers join countries on car_makers.Country = countries.CountryId join continents on countries.Continent = continents.ContId group by continents.continent
car_1 SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 2 ); SELECT Count(*) FROM (SELECT car_makers.Country FROM car_makers GROUP BY car_makers.Country HAVING Count(*) > 'terminal')
voter_1 SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes ) select count ( * ) from contestants where not ( contestants.contestant_number in ( select votes.contestant_number from votes ) )
student_transcripts_tracking SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor' select T3.semester_id from Degree_Programs as T1 join Student_Enrolment as T2 on T1.degree_program_id = T2.degree_program_id join Semesters as T3 on T2.semester_id = T3.semester_id where T1.degree_summary_name = 1 intersect select T5.semester_id from Degree_Programs as T4 join Student_Enrolment as T5 on T4.degree_program_id = T5.degree_program_id where T4.degree_summary_name = 1
cre_Doc_Template_Mgt SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK" select documents.document_name from Documents join Templates on Documents.Template_ID = Templates.Template_ID where templates.template_type_code = "value" intersect select documents.document_name from Documents join Templates on Documents.Template_ID = Templates.Template_ID where templates.template_type_code = "value"
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg(T1.Age) FROM Student AS T1 WHERE T1.StuID NOT IN (SELECT T2.StuID FROM Has_Pet AS T2 )
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' SELECT Paragraphs.Other_Details FROM Paragraphs WHERE Paragraphs.Paragraph_Text like 1
student_transcripts_tracking SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1 SELECT Transcripts.transcript_date FROM Transcripts JOIN Transcript_Contents ORDER BY Transcripts.transcript_date Desc LIMIT 1
car_1 SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1; select distinct model_list.model from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model order by cars_data.horsepower asc limit 1
car_1 SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent; select continents.continent , count(*) from car_makers join countries on car_makers.Country = countries.CountryId join continents on countries.Continent = continents.ContId group by continents.continent
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT Avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT Has_Pet.StuID FROM Has_Pet)
employee_hire_evaluation SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring) select shop.name from shop where not ( shop.shop_id in ( select hiring.shop_id from hiring ) )
car_1 SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1; SELECT car_names.Model FROM car_names JOIN model_list GROUP BY car_names.Model ORDER BY count(*) DESC LIMIT 1
student_transcripts_tracking SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs select count(*) from Degree_Programs
singer SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song) select singer.name from singer where not ( singer.singer_id in ( select song.singer_id from song ) )
car_1 SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)'; SELECT cars_data.Accelerate FROM car_names JOIN cars_data on cars_data.Id = car_names.MakeId WHERE car_names.Make = 1 or car_names.Make = 1
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM country JOIN countrylanguage GROUP BY countrylanguage.Language ORDER BY Count(*) Desc LIMIT 1
orchestra SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC SELECT T1.Major_Record_Format FROM orchestra AS T1 JOIN performance AS T3 GROUP BY T1.Major_Record_Format ORDER BY count(*) ASC
course_teach SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange) select teacher.name from teacher where not ( teacher.teacher_id in ( select course_arrange.teacher_id from course_arrange ) )
dog_kennels SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id select Professionals.professional_id , Professionals.role_code , Professionals.email_address from Professionals where Professionals.professional_id not in ( select Treatments.professional_id from Treatments )
cre_Doc_Template_Mgt SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show' SELECT count( DISTINCT T2.Paragraph_Text ) FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.Document_ID = T2.Document_ID WHERE T1.Document_Name = 'Summer Show'
world_1 SELECT count(*) FROM country WHERE GovernmentForm = "Republic" select count ( GovernmentForm ) from country where GovernmentForm like 1
voter_1 SELECT count(*) FROM area_code_state SELECT count( state ) FROM AREA_CODE_STATE
car_1 SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'; SELECT count( * ) FROM countries JOIN car_makers on car_makers.Country = countries.CountryId JOIN model_list on model_list.Maker = car_makers.Id WHERE countries.CountryName = 1
museum_visit SELECT t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1 SELECT visitor.Name, visitor.Age FROM visitor JOIN visit ON visitor.ID = visit.visitor_ID WHERE visit.Num_of_Ticket = (SELECT Max(visit.Num_of_Ticket) FROM visit) GROUP BY visitor.ID ORDER BY Count(*) Desc LIMIT 1
employee_hire_evaluation SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation) select employee.name from employee where not ( employee.employee_id in ( select evaluation.employee_id from evaluation ) )
dog_kennels SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id select Sizes.size_code , Owners.first_name , Owners.last_name from Dogs join Owners on Dogs.owner_id = Owners.owner_id join Sizes on Dogs.size_code = Sizes.size_code
network_1 SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select avg ( grade ) from Highschooler where ID in ( select student_id from Friend )
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT Min(Highschooler.grade) FROM Highschooler WHERE Highschooler.ID NOT IN (SELECT Friend.student_id FROM Friend)
dog_kennels SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code SELECT T3.first_name,T1.treatment_type_description FROM Treatment_Types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code JOIN Professionals AS T3 ON T2.professional_id = T3.professional_id
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name select T1.Name , T3.Course from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID order by T1.Name
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 select T2.Language from country as T1 join countrylanguage as T2 on T1.Code = T2.CountryCode group by T2.Language order by count ( * ) desc limit 1
network_1 SELECT name , grade FROM Highschooler select Highschooler.name , Highschooler.grade from Highschooler group by Highschooler.ID
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' SELECT T1.Other_Details FROM Paragraphs AS T1 WHERE T1.Paragraph_Text like 1
dog_kennels SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id select Sizes.size_code , Owners.first_name , Owners.last_name from Dogs join Owners on Dogs.owner_id = Owners.owner_id join Sizes on Dogs.size_code = Sizes.size_code
cre_Doc_Template_Mgt SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show' SELECT count( DISTINCT T2.Paragraph_Text ) FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.Document_ID = T2.Document_ID WHERE T1.Document_Name = 'Summer Show'
concert_singer SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014 select T3.Name from concert as T1 join singer_in_concert as T2 on T1.concert_ID = T2.concert_ID join singer as T3 on T2.Singer_ID = T3.Singer_ID where T1.Year = 1
dog_kennels SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id SELECT T1.professional_id, T1.role_code, T1.email_address FROM Professionals AS T1 WHERE T1.professional_id NOT IN (SELECT T2.professional_id FROM Treatments AS T2 )
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid SELECT StuID,count( * ) FROM Has_Pet GROUP BY StuID
course_teach SELECT Name FROM teacher WHERE Hometown != "Little Lever Urban Distric" select teacher.Name from teacher where teacher.Hometown != " value " and teacher.Hometown != " value "
tvshow SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones') select tv_channel.package_option from tv_channel where tv_channel.id not in (select tv_channel.id from cartoon join tv_channel on cartoon.channel = tv_channel.id where cartoon.directed_by = 'value' )
cre_Doc_Template_Mgt SELECT template_id , count(*) FROM Documents GROUP BY template_id select documents.template_id , count ( * ) from documents join templates on documents.template_id = templates.template_id group by documents.template_id
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg(T1.Age) FROM Student AS T1 WHERE T1.StuID NOT IN (SELECT T2.StuID FROM Has_Pet AS T2 )
student_transcripts_tracking SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs SELECT count( * ) FROM Degree_Programs
car_1 SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1; select model_list.model from car_names join model_list on car_names.Model = model_list.Model group by model_list.model order by count(*) desc limit 1
dog_kennels SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id select Professionals.professional_id , Professionals.role_code , Professionals.email_address from Professionals where Professionals.professional_id not in ( select Treatments.professional_id from Treatments )
cre_Doc_Template_Mgt SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code select distinct Ref_Template_Types.Template_Type_Code , count(*) from Documents join Templates on Documents.Template_ID = Templates.Template_ID join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code group by Ref_Template_Types.Template_Type_Code
student_transcripts_tracking SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2 SELECT T4.transcript_date,T4.transcript_id FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id JOIN Transcript_Contents AS T3 ON T2.student_course_id = T3.student_course_id JOIN Transcripts AS T4 ON T3.transcript_id = T4.transcript_id GROUP BY T4.transcript_id HAVING count( * ) >= 2
tvshow SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime"; select tv_series.air_date from tv_series join tv_channel on tv_series.channel = tv_channel.id where tv_series.episode = ' value '
dog_kennels SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1 SELECT name, age, weight FROM Dogs WHERE abandoned_yn = 1 INTERSECT SELECT name, age, weight FROM Dogs WHERE abandoned_yn = 1
battle_death SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I' SELECT DISTINCT battle.name FROM battle WHERE battle.bulgarian_commander = 'terminal' AND battle.latin_commander = 'terminal' AND battle.latin_commander = 'terminal'
cre_Doc_Template_Mgt SELECT template_id , count(*) FROM Documents GROUP BY template_id select templates.template_id , count ( * ) from templates join documents on templates.template_id = documents.template_id group by templates.template_id
pets_1 SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') SELECT Student.Major, Student.Age FROM Student WHERE Student.StuID NOT IN (SELECT Student.StuID FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = 1)
flight_2 SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = "Aberdeen" AND T3.Airline = "United Airlines" SELECT count( * ) FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.Airline JOIN airports AS T3 ON T2.DestAirport = T3.AirportCode WHERE T3.City = 'Aberdeen' and T1.Airline = 'United Airlines'
world_1 SELECT count(*) FROM country WHERE GovernmentForm = "Republic" select count ( Name ) from country where GovernmentForm = 1
network_1 SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT avg( grade ) FROM Highschooler WHERE ID IN ( SELECT student_id FROM Friend )
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 select T2.Language from country as T1 join countrylanguage as T2 on T1.Code = T2.CountryCode group by T2.Language order by count ( * ) desc limit 1
network_1 SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT Avg(Highschooler.grade) FROM Highschooler WHERE Highschooler.ID IN (SELECT Friend.student_id FROM Friend)
flight_2 SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = "Aberdeen" AND T3.Airline = "United Airlines" SELECT count( * ) FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.Airline JOIN airports AS T3 ON T2.DestAirport = T3.AirportCode WHERE T3.City = 'aberdeen' and T1.Airline = 'united airlines'
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) select avg ( student.age ) from student where not ( student.stuid in ( select has_pet.stuid from has_pet ) )
dog_kennels SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code SELECT T3.first_name,T1.treatment_type_description FROM Treatment_Types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code JOIN Professionals AS T3 ON T2.professional_id = T3.professional_id
cre_Doc_Template_Mgt SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents select templates.template_id from Templates where templates.template_id not in (select Documents.Template_ID from Documents )
wta_1 SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016 SELECT T2.winner_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.year = 2013 INTERSECT SELECT T2.winner_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.year = 2016
network_1 SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select avg ( highschooler.grade ) from highschooler where highschooler.id in ( select friend.student_id from friend )
student_transcripts_tracking SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1 SELECT max( transcript_date ) FROM Transcripts
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM country JOIN countrylanguage on countrylanguage.CountryCode = country.Code GROUP BY countrylanguage.Language ORDER BY count( * ) desc LIMIT 1
network_1 SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select avg ( grade ) from Highschooler where ID in ( select student_id from Friend )
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID SELECT teacher.Name, course.Course FROM course_arrange JOIN teacher ON course_arrange.Teacher_ID = teacher.Teacher_ID JOIN course ON course_arrange.Course_ID = course.Course_ID
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' SELECT TV_Channel.id FROM TV_Channel EXCEPT SELECT TV_Channel.idFROM TV_Channel JOIN Cartoon on Cartoon.Channel = TV_Channel.id WHERE Cartoon.Directed_by = 1
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select min ( grade ) from highschooler where id not in ( select student_id from friend )
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2 select T2.Document_ID from Paragraphs as T1 join Documents as T2 on T1.Document_ID = T2.Document_ID group by T1.Document_ID having count ( * ) between 1 and 1
cre_Doc_Template_Mgt SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = "Robbin CV" select Documents.Document_ID , Templates.Template_ID , Documents.Document_Description from Documents join Templates on Documents.Template_ID = Templates.Template_ID where Documents.Document_Name = 'Robbin CV'
dog_kennels SELECT count(DISTINCT dog_id) FROM Treatments SELECT Count(*) FROM Treatments
pets_1 SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') SELECT Student.Major, Student.Age FROM Student WHERE Student.StuID NOT IN (SELECT Student.StuID FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = 1)
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' SELECT Paragraphs.Other_Details FROM Paragraphs WHERE Paragraphs.Paragraph_Text LIKE 'terminal'
pets_1 SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid SELECT Student.Fname, Student.Age FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID JOIN Pets ON Has_Pet.PetID = Pets.PetID
cre_Doc_Template_Mgt SELECT template_id , count(*) FROM Documents GROUP BY template_id select templates.template_id , count(*) from Documents join Templates on Documents.Template_ID = Templates.Template_ID group by templates.template_id
cre_Doc_Template_Mgt SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1 select templates.template_id from Documents join Templates on Documents.Template_ID = Templates.Template_ID group by templates.template_id having count(*) > "value"
employee_hire_evaluation SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 select shop.district from shop where shop.number_products > 3000 intersect select shop.district from shop where shop.number_products < 10000
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID SELECT teacher.Name, course.Course FROM course_arrange JOIN teacher ON course_arrange.Teacher_ID = teacher.Teacher_ID JOIN course ON course_arrange.Course_ID = course.Course_ID
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name select teacher.Name , course.Course from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID order by teacher.Name asc
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) select avg ( Age ) from Student where StuID not in ( select StuID from Has_Pet )
car_1 SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1; SELECT Max(cars_data.MPG) FROM cars_data WHERE cars_data.Cylinders = 'terminal' OR cars_data.Year < 'terminal'
course_teach SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" select T1.Name from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID where T3.Course = 1
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM countrylanguage JOIN country GROUP BY countrylanguage.Language ORDER BY COUNT(*) DESC LIMIT 1
car_1 SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)'; SELECT T2.Accelerate FROM car_names AS T1 JOIN cars_data AS T2 ON T1.MakeId = T2.Id WHERE T1.Make = 'amc hornet sportabout' and T1.Make = 'amc hornet sportabout ( sw'
student_transcripts_tracking SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1 SELECT max( transcript_date ) FROM Transcripts
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT Avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT Has_Pet.StuID FROM Has_Pet)
pets_1 SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1 select Student.Fname , Student.Sex from Has_Pet join Student on Has_Pet.StuID = Student.StuID join Pets on Has_Pet.PetID = Pets.PetID group by Student.StuID having count(*) > 1
voter_1 SELECT count(*) FROM area_code_state SELECT count(state) FROM AREA_CODE_STATE
course_teach SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" select T1.Name from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID where T3.Course = 1
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select min ( highschooler.grade ) from highschooler where highschooler.id not in ( select friend.student_id from friend )
cre_Doc_Template_Mgt SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1 SELECT Ref_Template_Types.Template_Type_Code FROM Ref_Template_Types JOIN Templates on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code GROUP BY Templates.Template_Type_Code ORDER BY count( * ) desc LIMIT 1
cre_Doc_Template_Mgt SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents select Templates.Template_ID from Templates where templates.template_id not in (select Documents.Template_ID from Documents )
network_1 SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend select highschooler.id from highschooler except select highschooler.id from highschooler join friend on highschooler.id = friend.student_id
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2 select Documents.Document_ID from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID group by Documents.Document_ID having count(*) >= 2
cre_Doc_Template_Mgt SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code select templates.template_type_code , count ( * ) from templates join ref_template_types on templates.template_type_code = ref_template_types.template_type_code group by templates.template_type_code
dog_kennels SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1 SELECT Dogs.name, Dogs.age, Dogs.weight FROM Dogs WHERE Dogs.abandoned_yn = 'terminal' AND Dogs.abandoned_yn = 'terminal'
voter_1 SELECT count(*) FROM area_code_state SELECT count(T1.state) FROM AREA_CODE_STATE AS T1
pets_1 SELECT petid , weight FROM pets WHERE pet_age > 1 select PetID , weight from Pets where pet_age > 1 group by PetID
network_1 SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select avg ( grade ) from Highschooler where ID in ( select student_id from Friend )
cre_Doc_Template_Mgt SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents select templates.template_id from templates where templates.template_id not in (select documents.template_id from documents )
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' select Paragraphs.Other_Details from Paragraphs where Paragraphs.Paragraph_Text like "value"
orchestra SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance) select orchestra.orchestra from orchestra where not ( orchestra.orchestra_id in ( select performance.orchestra_id from performance ) )
car_1 SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'; select T4.Maker from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId join model_list as T3 on T2.Model = T3.Model join car_makers as T4 on T3.Maker = T4.Id where T1.Year = 1
world_1 SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese" select count(*) from countrylanguage join country on countrylanguage.CountryCode = country.Code where countrylanguage.language = "value"
student_transcripts_tracking SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs SELECT count(*) FROM Degree_Programs
course_teach SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange) select teacher.name from teacher where not ( teacher.teacher_id in ( select course_arrange.teacher_id from course_arrange ) )
battle_death SELECT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING sum(T3.killed) > 10 select battle.id , battle.name from death join ship on death.caused_by_ship_id = ship.id join battle on ship.lost_in_battle = battle.id group by battle.id having sum(death.killed) > 10
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg( Student.Age ) FROM Student WHERE Student.StuID not in ( SELECT Has_Pet.StuID FROM Has_Pet )
student_transcripts_tracking SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1 select courses.course_name from Student_Enrolment_Courses join Student_Enrolment on Student_Enrolment_Courses.student_enrolment_id = Student_Enrolment.student_enrolment_id join Courses on Student_Enrolment_Courses.course_id = Courses.course_id group by courses.course_name order by count(*) desc limit 1
network_1 SELECT student_id , count(*) FROM Likes GROUP BY student_id select count ( * ) , likes.student_id from highschooler join likes on highschooler.id = likes.student_id group by likes.student_id
poker_player SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000 select max ( poker_player.final_table_made ) from poker_player join people on poker_player.people_id = people.people_id where poker_player.earnings < ' value '
network_1 SELECT student_id , count(*) FROM Friend GROUP BY student_id SELECT student_id,count( friend_id ) FROM Friend GROUP BY student_id
dog_kennels SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code SELECT T3.first_name,T1.treatment_type_description FROM Treatment_Types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code JOIN Professionals AS T3 ON T2.professional_id = T3.professional_id
cre_Doc_Template_Mgt SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id select Documents.Document_ID , count(*) from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID group by Documents.Document_ID
cre_Doc_Template_Mgt SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents select Templates.Template_ID from Templates where templates.template_id not in (select Documents.Template_ID from Documents )
pets_1 SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' select student.stuid from Student where student.stuid not in (select Has_Pet.StuID from Has_Pet join Pets on Has_Pet.PetID = Pets.PetID where pets.pettype = "value" )
car_1 SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980; select distinct car_names.Model from cars_data join car_names on cars_data.Id = car_names.MakeId where cars_data.Year > 1980
dog_kennels SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1 SELECT Dogs.name , Dogs.age , Dogs.weight FROM Dogs WHERE Dogs.abandoned_yn = 1 INTERSECT SELECT Dogs.name , Dogs.age , Dogs.weight FROM Dogs WHERE Dogs.abandoned_yn = 1
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name select T1.Name , T3.Course from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID order by T1.Name asc
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) select avg ( student.age ) from student where not ( student.stuid in ( select has_pet.stuid from has_pet ) )
dog_kennels SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id select T3.first_name , T3.last_name , T1.size_code from Sizes as T1 join Dogs as T2 on T1.size_code = T2.size_code join Owners as T3 on T2.owner_id = T3.owner_id
dog_kennels SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id select Professionals.professional_id , Professionals.role_code , Professionals.email_address from Professionals where professionals.professional_id not in (select Treatments.professional_id from Treatments )
world_1 SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese" SELECT count( * ) FROM countrylanguage WHERE Language = 'Chinese'
cre_Doc_Template_Mgt SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT' SELECT count( * ) FROM Ref_Template_Types JOIN Templates on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code JOIN Documents on Documents.Template_ID = Templates.Template_ID WHERE Ref_Template_Types.Template_Type_Code = 1
cre_Doc_Template_Mgt SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT' select count(*) from Documents join Templates on Documents.Template_ID = Templates.Template_ID join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code where Templates.Template_Type_Code = "value"
cre_Doc_Template_Mgt SELECT template_id , count(*) FROM Documents GROUP BY template_id SELECT Templates.Template_ID , count( * ) FROM Templates JOIN Documents on Documents.Template_ID = Templates.Template_ID GROUP BY Documents.Template_ID
employee_hire_evaluation SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation) select employee.name from employee where not ( employee.employee_id in ( select evaluation.employee_id from evaluation ) )
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid select count ( * ) , StuID from Has_Pet group by StuID
student_transcripts_tracking SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1 select Semesters.semester_name , Semesters.semester_id from Student_Enrolment join Students on Student_Enrolment.student_id = Students.student_id join Semesters on Student_Enrolment.semester_id = Semesters.semester_id group by Semesters.semester_id order by count(*) desc limit 1
dog_kennels SELECT DISTINCT breed_code , size_code FROM dogs select T1.breed_code , T2.size_code from Breeds as T1 join Dogs as T2 on T1.breed_code = T2.breed_code
car_1 SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo'; select avg(cars_data.Edispl) from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model where model_list.Model = 'volvo'
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' select Other_Details from Paragraphs where Paragraph_Text like 1
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' select TV_Channel.id from TV_Channel where tv_channel.id not in (select Cartoon.Channel from Cartoon where Cartoon.Directed_by = 'Ben Jones' )
tvshow SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel; select count ( distinct series_name ) , count ( * ) from tv_channel
student_transcripts_tracking SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id select Courses.course_name from Student_Enrolment_Courses join Student_Enrolment on Student_Enrolment_Courses.student_enrolment_id = Student_Enrolment.student_enrolment_id join Courses on Student_Enrolment_Courses.course_id = Courses.course_id
museum_visit SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011 SELECT T3.Name FROM museum AS T1 JOIN visit AS T2 ON T1.Museum_ID = T2.Museum_ID JOIN visitor AS T3 ON T2.visitor_ID = T3.ID WHERE T1.Open_Year < '2009' INTERSECT SELECT T3.Name FROM museum AS T1 JOIN visit AS T2 ON T1.Museum_ID = T2.Museum_ID JOIN visitor AS T3 ON T2.visitor_ID = T3.ID WHERE T1.Open_Year > '2011'
dog_kennels SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1 select Owners.owner_id , Owners.last_name from Treatments join Dogs on Treatments.dog_id = Dogs.dog_id join Owners on Dogs.owner_id = Owners.owner_id group by Owners.owner_id order by count(*) desc limit 1
car_1 SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980; select distinct model_list.Model from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model where cars_data.Year > "value"
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' SELECT Documents.Document_ID FROM Documents JOIN Paragraphs on Paragraphs.Document_ID = Documents.Document_ID WHERE Paragraphs.Paragraph_Text = 1 INTERSECT SELECT Documents.Document_ID FROM Documents JOIN Paragraphs on Paragraphs.Document_ID = Documents.Document_ID WHERE Paragraphs.Paragraph_Text = 1
voter_1 SELECT count(*) FROM area_code_state select count(AREA_CODE_STATE.state) from AREA_CODE_STATE
pets_1 SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') SELECT Student.Major, Student.Age FROM Student WHERE Student.StuID NOT IN (SELECT Student.StuID FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = 1)
car_1 SELECT COUNT(*) FROM ( SELECT T1.CountryId , COUNT(*) FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) > 2 ); SELECT Count(*) FROM (SELECT car_makers.Country FROM car_makers GROUP BY car_makers.Country HAVING Count(*) > 'terminal')
car_1 SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6; select count ( * ) from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId where T1.Cylinders > 1
tvshow SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel; SELECT count( TV_Channel.series_name ) , count( * ) FROM TV_Channel
pets_1 SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' SELECT Student.StuID FROM Student EXCEPT SELECT Has_Pet.StuID FROM Has_Pet JOIN Pets on Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = 1
car_1 SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1; select cars_data.horsepower from cars_data where cars_data.accelerate = ( select max ( cars_data.accelerate ) from cars_data )
student_transcripts_tracking SELECT count(DISTINCT current_address_id) FROM Students select distinct count(*) from Students join Addresses on Students.permanent_address_id = Addresses.address_id
car_1 SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo'; select avg ( T3.Edispl ) from model_list as T1 join car_names as T2 on T1.Model = T2.Model join cars_data as T3 on T2.MakeId = T3.Id where T1.Model = 1
world_1 SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2 SELECT T1.Name,count( * ) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING count( * ) > 2
museum_visit SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011 select T3.Name from museum as T1 join visit as T2 on T1.Museum_ID = T2.Museum_ID join visitor as T3 on T2.visitor_ID = T3.ID where T1.Open_Year < 1 intersect select T6.Name from museum as T4 join visit as T5 on T4.Museum_ID = T5.Museum_ID join visitor as T6 on T5.visitor_ID = T6.ID where T4.Open_Year > 1
student_transcripts_tracking SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id select courses.course_name from Student_Enrolment_Courses join Student_Enrolment on Student_Enrolment_Courses.student_enrolment_id = Student_Enrolment.student_enrolment_id join Courses on Student_Enrolment_Courses.course_id = Courses.course_id
cre_Doc_Template_Mgt SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1 select Ref_Template_Types.Template_Type_Code from Templates join Ref_Template_Types on Templates.Template_Type_Code = Ref_Template_Types.Template_Type_Code group by Ref_Template_Types.Template_Type_Code order by count(*) desc limit 1
dog_kennels SELECT count(DISTINCT professional_id) FROM Treatments select count(*) from Treatments join Professionals on Treatments.professional_id = Professionals.professional_id
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 select countrylanguage.Language from countrylanguage join country on countrylanguage.CountryCode = country.Code group by countrylanguage.Language order by count ( * ) DESC limit 1
voter_1 SELECT count(*) FROM area_code_state SELECT Count(DISTINCT AREA_CODE_STATE.state) FROM AREA_CODE_STATE
network_1 SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle" select count ( * ) from highschooler as t1 join friend as t2 on t1.id = t2.student_id where t1.name = 1 and t1.name = 1
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg(Student.Age) FROM Student WHERE Student.StuID NOT IN (SELECT StuID FROM Has_Pet)
pets_1 SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' select StuID from Student except select T1.StuID from Has_Pet as T1 join Pets as T2 on T1.PetID = T2.PetID where T2.PetType = 1
course_teach SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name SELECT T3.Name,count( * ) FROM course AS T1 JOIN course_arrange AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T2.Teacher_ID = T3.Teacher_ID GROUP BY T3.Name
orchestra SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003 select orchestra.record_company from orchestra where orchestra.year_of_founded > 2003 intersect select orchestra.record_company from orchestra where orchestra.year_of_founded < 2003
cre_Doc_Template_Mgt SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1 select Templates.Template_ID from Documents join Templates on Documents.Template_ID = Templates.Template_ID group by Templates.Template_ID having count(*) > 1
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2 SELECT Documents.Document_ID FROM Documents JOIN Paragraphs on Paragraphs.Document_ID = Documents.Document_ID GROUP BY Paragraphs.Document_ID HAVING count( * ) >= 1
dog_kennels SELECT count(DISTINCT dog_id) FROM Treatments select count ( * ) from treatments
car_1 SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1; select max(cars_data.MPG) from cars_data where cars_data.Cylinders = 8 or cars_data.Year < 1980
course_teach SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" select teacher.Name from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID where course.Course = 'math'
dog_kennels SELECT count(DISTINCT professional_id) FROM Treatments SELECT count( Treatments.professional_id ) FROM Dogs JOIN Treatments on Treatments.dog_id = Dogs.dog_id
pets_1 SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' SELECT Student.StuID FROM Student EXCEPT SELECT Has_Pet.StuID FROM Has_Pet JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = 'terminal'
car_1 SELECT count(*) FROM CARS_DATA WHERE horsepower > 150; select count ( * ) from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId where T1.Horsepower > 1
car_1 SELECT count(*) FROM CARS_DATA WHERE horsepower > 150; SELECT count( * ) FROM car_names JOIN cars_data on cars_data.Id = car_names.MakeId WHERE cars_data.Horsepower > 1
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' select tv_channel.id from TV_Channel where tv_channel.id not in (select tv_channel.id from Cartoon join TV_Channel on Cartoon.Channel = TV_Channel.id where cartoon.directed_by = "value" )
car_1 SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980; select T3.Model from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId join model_list as T3 on T2.Model = T3.Model where T1.Year > 1
cre_Doc_Template_Mgt SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents select templates.template_id from Templates where templates.template_id not in (select Documents.Template_ID from Documents )
student_transcripts_tracking SELECT count(DISTINCT department_id) FROM Degree_Programs select count ( distinct degree_programs.degree_program_id ) from degree_programs
voter_1 SELECT count(*) FROM area_code_state SELECT count(state) FROM AREA_CODE_STATE
world_1 SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese" SELECT count(*) FROM countrylanguage AS T1 WHERE T1.Language = 1
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 select countrylanguage.language from countrylanguage join country on countrylanguage.CountryCode = country.Code group by countrylanguage.language order by count(*) desc limit 1
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT min( Highschooler.grade ) FROM Highschooler WHERE Highschooler.ID not in ( SELECT Friend.student_id FROM Friend )
poker_player SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player) select people.name from people where not ( people.people_id in ( select poker_player.people_id from poker_player ) )
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg( Student.Age ) FROM Student WHERE Student.StuID not in ( SELECT Has_Pet.StuID FROM Has_Pet )
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM country JOIN countrylanguage on countrylanguage.CountryCode = country.Code GROUP BY countrylanguage.Language ORDER BY count( * ) desc LIMIT 1
pets_1 SELECT avg(age) FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid) SELECT avg( Student.Age ) FROM Student WHERE Student.StuID not in ( SELECT Has_Pet.StuID FROM Has_Pet )
singer SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song) select singer.name from singer where not ( singer.singer_id in ( select song.singer_id from song ) )
world_1 SELECT name FROM city WHERE Population BETWEEN 160000 AND 90000 SELECT country.LocalName FROM country JOIN city WHERE city.Population BETWEEN 1 AND 2
car_1 SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4; select count ( * ) from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId where T1.Cylinders > 1
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid SELECT count( * ) , Has_Pet.StuID FROM Has_Pet JOIN Pets on Has_Pet.PetID = Pets.PetID GROUP BY Has_Pet.StuID
car_1 SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980; select distinct model_list.model from cars_data join car_names on cars_data.Id = car_names.MakeId join model_list on car_names.Model = model_list.Model where cars_data.year > "value"
world_1 SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa" SELECT count(*) FROM country AS T1 WHERE T1.Continent = 1
employee_hire_evaluation SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name select count ( * ) , shop.name from hiring join employee on hiring.employee_id = employee.employee_id join shop on hiring.shop_id = shop.shop_id group by shop.name
car_1 SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)'; SELECT cars_data.Accelerate FROM car_names JOIN cars_data on cars_data.Id = car_names.MakeId WHERE car_names.Make = 1 or car_names.Make = 1
course_teach SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" select teacher.Name from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID where course.Course = 'Math'
course_teach SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" select T1.Name from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID where T3.Course = 1
cre_Doc_Template_Mgt SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea' SELECT Other_Details FROM Paragraphs WHERE Paragraph_Text LIKE '%korea%'
cre_Doc_Template_Mgt SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = "Robbin CV" select documents.document_id , templates.template_id , documents.document_description from documents join templates on documents.template_id = templates.template_id where documents.document_name = ' value '
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) select min ( highschooler.grade ) from highschooler where highschooler.id not in ( select friend.student_id from friend )
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 select T1.Language from countrylanguage as T1 join country as T2 on T1.CountryCode = T2.Code group by T1.Language order by count ( * ) desc limit 1
cre_Doc_Template_Mgt SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1 select Documents.Document_ID from Paragraphs join Documents on Paragraphs.Document_ID = Documents.Document_ID group by Documents.Document_ID order by count(*) asc limit 1
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' SELECT TV_Channel.id FROM TV_Channel EXCEPT SELECT TV_Channel.idFROM TV_Channel JOIN Cartoon on Cartoon.Channel = TV_Channel.id WHERE Cartoon.Directed_by = 1
dog_kennels SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs ) select count ( * ) from owners where not ( owners.owner_id in ( select dogs.owner_id from dogs ) )
pets_1 SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') SELECT Student.Major, Student.Age FROM Student WHERE Student.StuID NOT IN (SELECT Student.StuID FROM Student JOIN Has_Pet ON Student.StuID = Has_Pet.StuID JOIN Pets ON Has_Pet.PetID = Pets.PetID WHERE Pets.PetType = 1)
tvshow SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1; SELECT TV_Channel.Language , count( * ) FROM TV_Channel GROUP BY TV_Channel.Language ORDER BY count( TV_Channel.Language ) asc LIMIT 1
car_1 SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1; select model_list.model from car_names join model_list on car_names.Model = model_list.Model group by model_list.model order by count(*) desc limit 1
car_1 SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3; select countries.CountryName from car_makers join countries on car_makers.Country = countries.CountryId join continents on countries.Continent = continents.ContId where continents.Continent = 'europe' group by countries.CountryName having count(*) >= 3
network_1 SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) SELECT min( Highschooler.grade ) FROM Highschooler WHERE Highschooler.ID not in ( SELECT Friend.student_id FROM Friend )
concert_singer SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert) select stadium.name from stadium where not ( stadium.stadium_id in ( select concert.stadium_id from concert ) )
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM country JOIN countrylanguage on countrylanguage.CountryCode = country.Code GROUP BY countrylanguage.Language ORDER BY count( * ) desc LIMIT 1
dog_kennels SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1 select Owners.owner_id , Owners.last_name from Treatments join Dogs on Treatments.dog_id = Dogs.dog_id join Owners on Dogs.owner_id = Owners.owner_id group by Owners.owner_id order by count(*) desc limit 1
cre_Doc_Template_Mgt SELECT template_id , count(*) FROM Documents GROUP BY template_id SELECT Templates.Template_ID , count( * ) FROM Templates JOIN Documents on Documents.Template_ID = Templates.Template_ID GROUP BY Documents.Template_ID
car_1 SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country; SELECT CountryName FROM countries WHERE CountryId NOT in ( SELECT Country FROM car_makers ) EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN car_makers AS T2 ON T1.CountryId = T2.Country
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID select T1.Name , T3.Course from teacher as T1 join course_arrange as T2 on T1.Teacher_ID = T2.Teacher_ID join course as T3 on T2.Course_ID = T3.Course_ID
world_1 SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa" SELECT count(*) FROM country WHERE Continent = 1
student_transcripts_tracking SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs SELECT count( * ) FROM Degree_Programs
cre_Doc_Template_Mgt SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1 select templates.template_id from Documents join Templates on Documents.Template_ID = Templates.Template_ID group by templates.template_id having count(*) > "value"
car_1 SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1; select cars_data.horsepower from cars_data where cars_data.accelerate = ( select max ( cars_data.accelerate ) from cars_data )
course_teach SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name select teacher.name , course.course from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID order by teacher.name asc
car_1 SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1; select T3.Model from cars_data as T1 join car_names as T2 on T1.Id = T2.MakeId join model_list as T3 on T2.Model = T3.Model order by T1.Horsepower asc limit 1
voter_1 SELECT count(*) FROM area_code_state SELECT count( state ) FROM AREA_CODE_STATE
employee_hire_evaluation SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 select shop.district from shop where shop.number_products > 3000 intersect select shop.district from shop where shop.number_products < 10000
pets_1 SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 select count ( * ) from Student as T1 join Has_Pet as T2 on T1.StuID = T2.StuID join Pets as T3 on T2.PetID = T3.PetID where T1.Age > 1
world_1 SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 SELECT countrylanguage.Language FROM country JOIN countrylanguage on countrylanguage.CountryCode = country.Code GROUP BY countrylanguage.Language ORDER BY count( * ) desc LIMIT 1
world_1 SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa" SELECT count(*) FROM country WHERE Continent = 1
tvshow SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' select TV_Channel.id from TV_Channel except select TV_Channel.id from Cartoon join TV_Channel on Cartoon.Channel = TV_Channel.id where Cartoon.Directed_by = 'Ben Jones'
course_teach SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2 select teacher.Name from course_arrange join teacher on course_arrange.Teacher_ID = teacher.Teacher_ID join course on course_arrange.Course_ID = course.Course_ID group by teacher.Name having count(*) >= 2
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid SELECT T1.StuID,count( * ) FROM Has_Pet AS T1 JOIN Pets AS T2 ON T1.PetID = T2.PetID GROUP BY T1.StuID
pets_1 SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid SELECT count( * ),StuID FROM Has_Pet GROUP BY StuID
car_1 SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR < 1980; SELECT avg( cars_data.Horsepower ) FROM car_names JOIN cars_data on cars_data.Id = car_names.MakeId WHERE cars_data.Year < 1
concert_singer SELECT count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id ORDER BY T2.Capacity DESC LIMIT 1 SELECT count( * ) FROM stadium AS T1 JOIN concert AS T2 ON T1.Stadium_ID = T2.Stadium_ID ORDER BY T1.Highest DESC LIMIT 1