-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrigin_dev_Bird.json
More file actions
12274 lines (12274 loc) · 724 KB
/
Origin_dev_Bird.json
File metadata and controls
12274 lines (12274 loc) · 724 KB
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
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[
{
"question_id": 0,
"db_id": "california_schools",
"question": "What is the highest eligible free rate for K-12 students in the schools in Alameda County?",
"evidence": "Eligible free rate for K-12 = `Free Meal Count (K-12)` / `Enrollment (K-12)`",
"SQL": "SELECT `Free Meal Count (K-12)` / `Enrollment (K-12)` FROM frpm WHERE `County Name` = 'Alameda' ORDER BY (CAST(`Free Meal Count (K-12)` AS REAL) / `Enrollment (K-12)`) DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 1,
"db_id": "california_schools",
"question": "Please list the lowest three eligible free rates for students aged 5-17 in continuation schools.",
"evidence": "Eligible free rates for students aged 5-17 = `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)`",
"SQL": "SELECT `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` FROM frpm WHERE `Educational Option Type` = 'Continuation School' AND `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` IS NOT NULL ORDER BY `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` ASC LIMIT 3",
"difficulty": "moderate"
},
{
"question_id": 2,
"db_id": "california_schools",
"question": "Please list the zip code of all the charter schools in Fresno County Office of Education.",
"evidence": "Charter schools refers to `Charter School (Y/N)` = 1 in the table fprm",
"SQL": "SELECT T2.Zip FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`District Name` = 'Fresno County Office of Education' AND T1.`Charter School (Y/N)` = 1",
"difficulty": "simple"
},
{
"question_id": 3,
"db_id": "california_schools",
"question": "What is the unabbreviated mailing street address of the school with the highest FRPM count for K-12 students?",
"evidence": "",
"SQL": "SELECT T2.MailStreet FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T1.`FRPM Count (K-12)` DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 4,
"db_id": "california_schools",
"question": "Please list the phone numbers of the direct charter-funded schools that are opened after 2000/1/1.",
"evidence": "Charter schools refers to `Charter School (Y/N)` = 1 in the frpm",
"SQL": "SELECT T2.Phone FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Charter Funding Type` = 'Directly funded' AND T1.`Charter School (Y/N)` = 1 AND T2.OpenDate > '2000-01-01'",
"difficulty": "moderate"
},
{
"question_id": 5,
"db_id": "california_schools",
"question": "How many schools with an average score in Math greater than 400 in the SAT test are exclusively virtual?",
"evidence": "Exclusively virtual refers to Virtual = 'F'",
"SQL": "SELECT COUNT(DISTINCT T2.School) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Virtual = 'F' AND T1.AvgScrMath > 400",
"difficulty": "simple"
},
{
"question_id": 6,
"db_id": "california_schools",
"question": "Among the schools with the SAT test takers of over 500, please list the schools that are magnet schools or offer a magnet program.",
"evidence": "Magnet schools or offer a magnet program means that Magnet = 1",
"SQL": "SELECT T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Magnet = 1 AND T1.NumTstTakr > 500",
"difficulty": "simple"
},
{
"question_id": 7,
"db_id": "california_schools",
"question": "What is the phone number of the school that has the highest number of test takers with an SAT score of over 1500?",
"evidence": "",
"SQL": "SELECT T2.Phone FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 8,
"db_id": "california_schools",
"question": "What is the number of SAT test takers of the schools with the highest FRPM count for K-12 students?",
"evidence": "",
"SQL": "SELECT NumTstTakr FROM satscores WHERE cds = ( SELECT CDSCode FROM frpm ORDER BY `FRPM Count (K-12)` DESC LIMIT 1 )",
"difficulty": "simple"
},
{
"question_id": 9,
"db_id": "california_schools",
"question": "Among the schools with the average score in Math over 560 in the SAT test, how many schools are directly charter-funded?",
"evidence": "",
"SQL": "SELECT COUNT(T2.`School Code`) FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath > 560 AND T2.`Charter Funding Type` = 'Directly funded'",
"difficulty": "simple"
},
{
"question_id": 10,
"db_id": "california_schools",
"question": "For the school with the highest average score in Reading in the SAT test, what is its FRPM count for students aged 5-17?",
"evidence": "",
"SQL": "SELECT T2.`FRPM Count (Ages 5-17)` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrRead DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 11,
"db_id": "california_schools",
"question": "Please list the codes of the schools with a total enrollment of over 500.",
"evidence": "Total enrollment can be represented by `Enrollment (K-12)` + `Enrollment (Ages 5-17)`",
"SQL": "SELECT T2.CDSCode FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.`Enrollment (K-12)` + T2.`Enrollment (Ages 5-17)` > 500",
"difficulty": "simple"
},
{
"question_id": 12,
"db_id": "california_schools",
"question": "Among the schools with an SAT excellence rate of over 0.3, what is the highest eligible free rate for students aged 5-17?",
"evidence": "Excellence rate = NumGE1500 / NumTstTakr; Eligible free rates for students aged 5-17 = `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)`",
"SQL": "SELECT MAX(CAST(T1.`Free Meal Count (Ages 5-17)` AS REAL) / T1.`Enrollment (Ages 5-17)`) FROM frpm AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE CAST(T2.NumGE1500 AS REAL) / T2.NumTstTakr > 0.3",
"difficulty": "moderate"
},
{
"question_id": 13,
"db_id": "california_schools",
"question": "Please list the phone numbers of the schools with the top 3 SAT excellence rate.",
"evidence": "Excellence rate = NumGE1500 / NumTstTakr",
"SQL": "SELECT T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds ORDER BY CAST(T2.NumGE1500 AS REAL) / T2.NumTstTakr DESC LIMIT 3",
"difficulty": "simple"
},
{
"question_id": 14,
"db_id": "california_schools",
"question": "List the top five schools, by descending order, from the highest to the lowest, the most number of Enrollment (Ages 5-17). Please give their NCES school identification number.",
"evidence": "",
"SQL": "SELECT T1.NCESSchool FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T2.`Enrollment (Ages 5-17)` DESC LIMIT 5",
"difficulty": "simple"
},
{
"question_id": 15,
"db_id": "california_schools",
"question": "Which active district has the highest average score in Reading?",
"evidence": "",
"SQL": "SELECT T1.District FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.StatusType = 'Active' ORDER BY T2.AvgScrRead DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 16,
"db_id": "california_schools",
"question": "How many schools in merged Alameda have number of test takers less than 100?",
"evidence": "",
"SQL": "SELECT COUNT(T1.CDSCode) FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.StatusType = 'Merged' AND T2.NumTstTakr < 100 AND T1.County = 'Lake'",
"difficulty": "simple"
},
{
"question_id": 17,
"db_id": "california_schools",
"question": "Rank schools by their average score in Writing where the score is greater than 499, showing their charter numbers.",
"evidence": "Valid charter number means the number is not null",
"SQL": "SELECT CharterNum, AvgScrWrite, RANK() OVER (ORDER BY AvgScrWrite DESC) AS WritingScoreRank FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T2.AvgScrWrite > 499 AND CharterNum is not null",
"difficulty": "simple"
},
{
"question_id": 18,
"db_id": "california_schools",
"question": "How many schools in Fresno (directly funded) have number of test takers not more than 250?",
"evidence": "",
"SQL": "SELECT COUNT(T1.CDSCode) FROM frpm AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.`Charter Funding Type` = 'Directly funded' AND T1.`County Name` = 'Fresno' AND T2.NumTstTakr <= 250",
"difficulty": "simple"
},
{
"question_id": 19,
"db_id": "california_schools",
"question": "What is the phone number of the school that has the highest average score in Math?",
"evidence": "",
"SQL": "SELECT T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds ORDER BY T2.AvgScrMath DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 20,
"db_id": "california_schools",
"question": "How many schools in Amador which the Low Grade is 9 and the High Grade is 12?",
"evidence": "",
"SQL": "SELECT COUNT(T1.`School Name`) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Amador' AND T1.`Low Grade` = 9 AND T1.`High Grade` = 12",
"difficulty": "simple"
},
{
"question_id": 21,
"db_id": "california_schools",
"question": "In Los Angeles how many schools have more than 500 free meals but less than 700 free or reduced price meals for K-12?",
"evidence": "",
"SQL": "SELECT COUNT(CDSCode) FROM frpm WHERE `County Name` = 'Los Angeles' AND `Free Meal Count (K-12)` > 500 AND `FRPM Count (K-12)`< 700",
"difficulty": "simple"
},
{
"question_id": 22,
"db_id": "california_schools",
"question": "Which school in Contra Costa has the highest number of test takers?",
"evidence": "",
"SQL": "SELECT sname FROM satscores WHERE cname = 'Contra Costa' AND sname IS NOT NULL ORDER BY NumTstTakr DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 23,
"db_id": "california_schools",
"question": "List the names of schools with more than 30 difference in enrollements between K-12 and ages 5-17? Please also give the full street adress of the schools.",
"evidence": "Diffrence in enrollement = `Enrollment (K-12)` - `Enrollment (Ages 5-17)`",
"SQL": "SELECT T1.School, T1.Street FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.`Enrollment (K-12)` - T2.`Enrollment (Ages 5-17)` > 30",
"difficulty": "moderate"
},
{
"question_id": 24,
"db_id": "california_schools",
"question": "Give the names of the schools with the percent eligible for free meals in K-12 is more than 0.1 and test takers whose test score is greater than or equal to 1500?",
"evidence": "Percent eligible for free meals = Free Meal Count (K-12) / Total (Enrollment (K-12)",
"SQL": "SELECT T2.`School Name` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE CAST(T2.`Free Meal Count (K-12)` AS REAL) / T2.`Enrollment (K-12)` > 0.1 AND T1.NumGE1500 > 0",
"difficulty": "moderate"
},
{
"question_id": 25,
"db_id": "california_schools",
"question": "Name schools in Riverside which the average of average math score for SAT is grater than 400, what is the funding type of these schools?",
"evidence": "Average of average math = sum(average math scores) / count(schools).",
"SQL": "SELECT T1.sname, T2.`Charter Funding Type` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE T2.`District Name` LIKE 'Riverside%' GROUP BY T1.sname, T2.`Charter Funding Type` HAVING CAST(SUM(T1.AvgScrMath) AS REAL) / COUNT(T1.cds) > 400",
"difficulty": "moderate"
},
{
"question_id": 26,
"db_id": "california_schools",
"question": "State the names and full communication address of high schools in Monterey which has more than 800 free or reduced price meals for ages 15-17?",
"evidence": "Full communication address should include Street, City, State and zip code if any.",
"SQL": "SELECT T1.`School Name`, T2.Street, T2.City, T2.State, T2.Zip FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Monterey' AND T1.`Free Meal Count (Ages 5-17)` > 800 AND T1.`School Type` = 'High Schools (Public)'",
"difficulty": "moderate"
},
{
"question_id": 27,
"db_id": "california_schools",
"question": "What is the average score in writing for the schools that were opened after 1991 or closed before 2000? List the school names along with the score. Also, list the communication number of the schools if there is any.",
"evidence": "Communication number refers to phone number.",
"SQL": "SELECT T2.School, T1.AvgScrWrite, T2.Phone FROM schools AS T2 LEFT JOIN satscores AS T1 ON T2.CDSCode = T1.cds WHERE strftime('%Y', T2.OpenDate) > '1991' OR strftime('%Y', T2.ClosedDate) < '2000'",
"difficulty": "moderate"
},
{
"question_id": 28,
"db_id": "california_schools",
"question": "Consider the average difference between K-12 enrollment and 15-17 enrollment of schools that are locally funded, list the names and DOC type of schools which has a difference above this average.",
"evidence": "Difference between K-12 enrollment and 15-17 enrollment can be computed by `Enrollment (K-12)` - `Enrollment (Ages 5-17)`",
"SQL": "SELECT T2.School, T2.DOC FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.FundingType = 'Locally funded' AND (T1.`Enrollment (K-12)` - T1.`Enrollment (Ages 5-17)`) > (SELECT AVG(T3.`Enrollment (K-12)` - T3.`Enrollment (Ages 5-17)`) FROM frpm AS T3 INNER JOIN schools AS T4 ON T3.CDSCode = T4.CDSCode WHERE T4.FundingType = 'Locally funded')",
"difficulty": "challenging"
},
{
"question_id": 29,
"db_id": "california_schools",
"question": "When did the first-through-twelfth-grade school with the largest enrollment open?",
"evidence": "K-12 means First-through-twelfth-grade",
"SQL": "SELECT T2.OpenDate FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 30,
"db_id": "california_schools",
"question": "Which cities have the top 5 lowest enrollment number for students in grades 1 through 12?",
"evidence": "K-12 refers to students in grades 1 through 12.",
"SQL": "SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode GROUP BY T2.City ORDER BY SUM(T1.`Enrollment (K-12)`) ASC LIMIT 5",
"difficulty": "simple"
},
{
"question_id": 31,
"db_id": "california_schools",
"question": "What is the eligible free rate of the 10th and 11th schools with the highest enrolment for students in grades 1 through 12?",
"evidence": "K-12 refers to students in grades 1 through 12; Eligible free rate for K-12 = `Free Meal Count (K-12)` / `Enrollment (K-12)`",
"SQL": "SELECT CAST(`Free Meal Count (K-12)` AS REAL) / `Enrollment (K-12)` FROM frpm ORDER BY `Enrollment (K-12)` DESC LIMIT 9, 2",
"difficulty": "moderate"
},
{
"question_id": 32,
"db_id": "california_schools",
"question": "What is the eligible free or reduced price meal rate for the top 5 schools in grades 1-12 with the highest free or reduced price meal count of the schools with the ownership code 66?",
"evidence": "grades 1-12 means K-12; Eligible free or reduced price meal rate for K-12 = `FRPM Count (K-12)` / `Enrollment (K-12)`",
"SQL": "SELECT CAST(T1.`FRPM Count (K-12)` AS REAL) / T1.`Enrollment (K-12)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.SOC = 66 ORDER BY T1.`FRPM Count (K-12)` DESC LIMIT 5",
"difficulty": "moderate"
},
{
"question_id": 33,
"db_id": "california_schools",
"question": "If there are any, what are the websites address of the schools with a free meal count of 1,900-2,000 to students aged 5-17? Include the name of the school.",
"evidence": "",
"SQL": "SELECT T2.Website, T1.`School Name` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Free Meal Count (Ages 5-17)` BETWEEN 1900 AND 2000 AND T2.Website IS NOT NULL",
"difficulty": "moderate"
},
{
"question_id": 34,
"db_id": "california_schools",
"question": "What is the free rate for students between the ages of 5 and 17 at the school run by Kacey Gibson?",
"evidence": "Eligible free rates for students aged 5-17 = `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)`",
"SQL": "SELECT CAST(T2.`Free Meal Count (Ages 5-17)` AS REAL) / T2.`Enrollment (Ages 5-17)` FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.AdmFName1 = 'Kacey' AND T1.AdmLName1 = 'Gibson'",
"difficulty": "moderate"
},
{
"question_id": 35,
"db_id": "california_schools",
"question": "What is the administrator's email address of the chartered school with the fewest students enrolled in grades 1 through 12?",
"evidence": "Charted school means `Charter School (Y/N)` = 1 in the table frpm; Students enrolled in grades 1 through 12 refers to `Enrollment (K-12)`",
"SQL": "SELECT T2.AdmEmail1 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Charter School (Y/N)` = 1 ORDER BY T1.`Enrollment (K-12)` ASC LIMIT 1",
"difficulty": "moderate"
},
{
"question_id": 36,
"db_id": "california_schools",
"question": "Under whose administration is the school with the highest number of students scoring 1500 or more on the SAT? Indicate their full names.",
"evidence": "full name means first name, last name; There are at most 3 administrators for each school; SAT Scores are greater or equal to 1500 refers to NumGE1500",
"SQL": "SELECT T2.AdmFName1, T2.AdmLName1, T2.AdmFName2, T2.AdmLName2, T2.AdmFName3, T2.AdmLName3 FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1",
"difficulty": "challenging"
},
{
"question_id": 37,
"db_id": "california_schools",
"question": "What is the complete address of the school with the lowest excellence rate? Indicate the Street, City, Zip and State.",
"evidence": "Execellence Rate = NumGE1500 / NumTstTakr; complete address has Street, City, State, Zip code",
"SQL": "SELECT T2.Street, T2.City, T2.State, T2.Zip FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY CAST(T1.NumGE1500 AS REAL) / T1.NumTstTakr ASC LIMIT 1",
"difficulty": "moderate"
},
{
"question_id": 38,
"db_id": "california_schools",
"question": "What are the webpages for the Los Angeles County school that has between 2,000 and 3,000 test takers?",
"evidence": "",
"SQL": "SELECT T2.Website FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.NumTstTakr BETWEEN 2000 AND 3000 AND T2.County = 'Los Angeles'",
"difficulty": "simple"
},
{
"question_id": 39,
"db_id": "california_schools",
"question": "What is the average number of test takers from Fresno schools that opened between 1/1/1980 and 12/31/1980?",
"evidence": "between 1/1/1980 and 12/31/1980 means the year = 1980",
"SQL": "SELECT AVG(T1.NumTstTakr) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE strftime('%Y', T2.OpenDate) = '1980' AND T2.County = 'Fresno'",
"difficulty": "simple"
},
{
"question_id": 40,
"db_id": "california_schools",
"question": "What is the telephone number for the school with the lowest average score in reading in Fresno Unified?",
"evidence": "Fresno Unified is a name of district;",
"SQL": "SELECT T2.Phone FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.District = 'Fresno Unified' AND T1.AvgScrRead IS NOT NULL ORDER BY T1.AvgScrRead ASC LIMIT 1",
"difficulty": "moderate"
},
{
"question_id": 41,
"db_id": "california_schools",
"question": "List the names of virtual schools that are among the top 5 in their respective counties based on average reading scores.",
"evidence": "Exclusively virtual refers to Virtual = 'F'; respective counties means PARTITION BY County",
"SQL": "SELECT School FROM (SELECT T2.School,T1.AvgScrRead, RANK() OVER (PARTITION BY T2.County ORDER BY T1.AvgScrRead DESC) AS rnk FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Virtual = 'F' ) ranked_schools WHERE rnk <= 5",
"difficulty": "simple"
},
{
"question_id": 42,
"db_id": "california_schools",
"question": "What is the type of education offered in the school who scored the highest average in Math?",
"evidence": "",
"SQL": "SELECT T2.EdOpsName FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 43,
"db_id": "california_schools",
"question": "What is the average math score of the school with the lowest average score for all subjects, and in which county is it located?",
"evidence": "Average score for all subjects can be computed by AvgScrMath + AvgScrRead + AvgScrWrite",
"SQL": "SELECT T1.AvgScrMath, T2.County FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath IS NOT NULL ORDER BY T1.AvgScrMath + T1.AvgScrRead + T1.AvgScrWrite ASC LIMIT 1",
"difficulty": "moderate"
},
{
"question_id": 44,
"db_id": "california_schools",
"question": "What is the average writing score of the school who has the highest number of test takers whose total SAT sscores are greater or equal to 1500? Indicate the city to where the school is situated.",
"evidence": "",
"SQL": "SELECT T1.AvgScrWrite, T2.City FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 45,
"db_id": "california_schools",
"question": "What is the average writing score of each of the schools managed by Ricci Ulrich? List the schools and the corresponding average writing scores.",
"evidence": "Usually, administrators manage the school stuff.",
"SQL": "SELECT T2.School, T1.AvgScrWrite FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.AdmFName1 = 'Ricci' AND T2.AdmLName1 = 'Ulrich'",
"difficulty": "moderate"
},
{
"question_id": 46,
"db_id": "california_schools",
"question": "Which state special schools have the highest number of enrollees from grades 1 through 12?",
"evidence": "State Special Schools refers to DOC = 31; Grades 1 through 12 means K-12",
"SQL": "SELECT T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.DOC = 31 ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 47,
"db_id": "california_schools",
"question": "What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980?",
"evidence": "Elementary School District refers to DOC = 52; Monthly average number of schools that opened in 1980 = count(schools that opened in 1980) / 12",
"SQL": "SELECT CAST(COUNT(School) AS REAL) / 12 FROM schools WHERE DOC = 52 AND County = 'Alameda' AND strftime('%Y', OpenDate) = '1980'",
"difficulty": "moderate"
},
{
"question_id": 48,
"db_id": "california_schools",
"question": "What is the ratio of merged Unified School District schools in Orange County to merged Elementary School District schools?",
"evidence": "Elementary School District refers to DOC = 52; Unified School District refers to DOC = 54.",
"SQL": "SELECT CAST(SUM(CASE WHEN DOC = 54 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN DOC = 52 THEN 1 ELSE 0 END) FROM schools WHERE StatusType = 'Merged' AND County = 'Orange'",
"difficulty": "moderate"
},
{
"question_id": 49,
"db_id": "california_schools",
"question": "Which different county has the most number of closed schools? Please provide the name of each school as well as the closure date.",
"evidence": "Closure date and closed date are synonyms; 'Closed' was mentioned in schools.StatusType.",
"SQL": "SELECT DISTINCT County, School, ClosedDate FROM schools WHERE County = ( SELECT County FROM schools WHERE StatusType = 'Closed' GROUP BY County ORDER BY COUNT(School) DESC LIMIT 1 ) AND StatusType = 'Closed' AND school IS NOT NULL",
"difficulty": "moderate"
},
{
"question_id": 50,
"db_id": "california_schools",
"question": "What is the postal street address for the school with the 7th highest Math average? Indicate the school's name.",
"evidence": "Postal street and mailing street are synonyms.",
"SQL": "SELECT T2.MailStreet, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC LIMIT 6, 1",
"difficulty": "simple"
},
{
"question_id": 51,
"db_id": "california_schools",
"question": "In which mailing street address can you find the school that has the lowest average score in reading? Also give the school's name.",
"evidence": "",
"SQL": "SELECT T2.MailStreet, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrRead IS NOT NULL ORDER BY T1.AvgScrRead ASC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 52,
"db_id": "california_schools",
"question": "What is the total number of schools whose total SAT scores are greater or equal to 1500 whose mailing city is Lakeport?",
"evidence": "Total SAT scores can be computed by AvgScrRead + AvgScrMath + AvgScrWrite",
"SQL": "SELECT COUNT(T1.cds) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.MailCity = 'Lakeport' AND (T1.AvgScrRead + T1.AvgScrMath + T1.AvgScrWrite) >= 1500",
"difficulty": "simple"
},
{
"question_id": 53,
"db_id": "california_schools",
"question": "How many test takers are there at the school/s whose mailing city address is in Fresno?",
"evidence": "",
"SQL": "SELECT T1.NumTstTakr FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.MailCity = 'Fresno'",
"difficulty": "simple"
},
{
"question_id": 54,
"db_id": "california_schools",
"question": "Please specify all of the schools and their related mailing zip codes that are under Avetik Atoian's administration.",
"evidence": "",
"SQL": "SELECT School, MailZip FROM schools WHERE AdmFName1 = 'Avetik' AND AdmLName1 = 'Atoian'",
"difficulty": "simple"
},
{
"question_id": 55,
"db_id": "california_schools",
"question": "Of the schools with a mailing state address in California, what is the ratio of the schools located in the county of Colusa against the school located in the county of Humboldt?",
"evidence": "Ratio = count(schools in Colusa) / count(schools in Humboldt)",
"SQL": "SELECT CAST(SUM(CASE WHEN County = 'Colusa' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN County = 'Humboldt' THEN 1 ELSE 0 END) FROM schools WHERE MailState = 'CA'",
"difficulty": "moderate"
},
{
"question_id": 56,
"db_id": "california_schools",
"question": "Of all the schools with a mailing state address in California, how many are active in San Joaquin city?",
"evidence": "",
"SQL": "SELECT COUNT(CDSCode) FROM schools WHERE City = 'San Joaquin' AND MailState = 'CA' AND StatusType = 'Active'",
"difficulty": "simple"
},
{
"question_id": 57,
"db_id": "california_schools",
"question": "What is the phone number and extension number for the school that had the 333rd highest average writing score?",
"evidence": "",
"SQL": "SELECT T2.Phone, T2.Ext FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrWrite DESC LIMIT 332, 1",
"difficulty": "simple"
},
{
"question_id": 58,
"db_id": "california_schools",
"question": "What is the phone number and extension number for the school with the zip code 95203-3704? Indicate the school's name.",
"evidence": "",
"SQL": "SELECT Phone, Ext, School FROM schools WHERE Zip = '95203-3704'",
"difficulty": "simple"
},
{
"question_id": 59,
"db_id": "california_schools",
"question": "What is the website for the schools under the administrations of Mike Larson and Dante Alvarez?",
"evidence": "",
"SQL": "SELECT Website FROM schools WHERE (AdmFName1 = 'Mike' AND AdmLName1 = 'Larson') OR (AdmFName1 = 'Dante' AND AdmLName1 = 'Alvarez')",
"difficulty": "simple"
},
{
"question_id": 60,
"db_id": "california_schools",
"question": "What are the websites for all the partially virtual chartered schools located in San Joaquin?",
"evidence": "Virtual = 'P' means partially virtual; Charter schools refers to Charter = 1 in the table schools",
"SQL": "SELECT Website FROM schools WHERE County = 'San Joaquin' AND Virtual = 'P' AND Charter = 1",
"difficulty": "simple"
},
{
"question_id": 61,
"db_id": "california_schools",
"question": "How many chartered schools located in the city of Hickman are owned by the Elementary School District?",
"evidence": "Elementary School District refers to DOC = 52; Chartered schools refer to Charter = 1 in the table schools",
"SQL": "SELECT COUNT(School) FROM schools WHERE DOC = 52 AND Charter = 1 AND City = 'Hickman'",
"difficulty": "simple"
},
{
"question_id": 62,
"db_id": "california_schools",
"question": "What is the total number of non-chartered schools in the county of Los Angeles with a percent (%) of eligible free meals for grades 1 through 12 that is less than 0.18%?",
"evidence": "non-chartered schools refer to schools whose Charter = 0; K-12 means grades 1 through 12; percent of eligible free rate for K-12 = `Free Meal Count (K-12)` * 100 / `Enrollment (K-12)`",
"SQL": "SELECT COUNT(T2.School) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.Charter = 0 AND CAST(T1.`Free Meal Count (K-12)` AS REAL) * 100 / T1.`Enrollment (K-12)` < 0.18",
"difficulty": "challenging"
},
{
"question_id": 63,
"db_id": "california_schools",
"question": "In chartered schools with charter number 00D2, what are the names of all the administrators? Include the name of the school and the city to which it belongs",
"evidence": "Chartered schools refer to Charter = 1 in the table schools; Full name refers to first name, last name",
"SQL": "SELECT AdmFName1, AdmLName1, School, City FROM schools WHERE Charter = 1 AND CharterNum = '00D2'",
"difficulty": "simple"
},
{
"question_id": 64,
"db_id": "california_schools",
"question": "What is the total number of schools with a mailing city in Hickman belonging to the charter number 00D4?",
"evidence": "",
"SQL": "SELECT COUNT(*) FROM schools WHERE CharterNum = '00D4' AND MailCity = 'Hickman'",
"difficulty": "simple"
},
{
"question_id": 65,
"db_id": "california_schools",
"question": "What is the ratio in percentage of Santa Clara County schools that are locally funded compared to all other types of charter school funding?",
"evidence": "Ratio in percentage = (count(locally funded schools in Santa Clara) / count(all funding type schools in Santa Clara) * 100%",
"SQL": "SELECT CAST(SUM(CASE WHEN FundingType = 'Locally funded' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN FundingType != 'Locally funded' THEN 1 ELSE 0 END) FROM schools WHERE County = 'Santa Clara' AND Charter = 1",
"difficulty": "moderate"
},
{
"question_id": 66,
"db_id": "california_schools",
"question": "Between 1/1/2000 to 12/31/2005, how many directly funded schools opened in the county of Stanislaus?",
"evidence": "Directly funded schools refers to FundingType = 'Directly Funded'",
"SQL": "SELECT COUNT(School) FROM schools WHERE strftime('%Y', OpenDate) BETWEEN '2000' AND '2005' AND County = 'Stanislaus' AND FundingType = 'Directly funded'",
"difficulty": "simple"
},
{
"question_id": 67,
"db_id": "california_schools",
"question": "What is the total amount of Community College District closure in 1989 in the city of San Francisco?",
"evidence": "",
"SQL": "SELECT COUNT(School) FROM schools WHERE strftime('%Y', ClosedDate) = '1989' AND City = 'San Francisco' AND DOCType = 'Community College District'",
"difficulty": "simple"
},
{
"question_id": 68,
"db_id": "california_schools",
"question": "Which county reported the most number of school closure in the 1980s with school wonership code belonging to Youth Authority Facilities (CEA)?",
"evidence": "Youth Authority Facilities (CEA) refers to SOC = 11; 1980s = years between 1980 and 1989",
"SQL": "SELECT County FROM schools WHERE strftime('%Y', ClosedDate) BETWEEN '1980' AND '1989' AND StatusType = 'Closed' AND SOC = 11 GROUP BY County ORDER BY COUNT(School) DESC LIMIT 1",
"difficulty": "moderate"
},
{
"question_id": 69,
"db_id": "california_schools",
"question": "Please provide the National Center for Educational Statistics school district identification number for all schools with a School Ownership Code that are part of the State Special Schools.",
"evidence": "State Special Schools means that SOC = 31.",
"SQL": "SELECT NCESDist FROM schools WHERE SOC = 31",
"difficulty": "simple"
},
{
"question_id": 70,
"db_id": "california_schools",
"question": "How many active and closed District Community Day Schools are there in the county of Alpine?",
"evidence": "",
"SQL": "SELECT COUNT(School) FROM schools WHERE (StatusType = 'Closed' OR StatusType = 'Active') AND SOC = 69 AND County = 'Alpine'",
"difficulty": "simple"
},
{
"question_id": 71,
"db_id": "california_schools",
"question": "What is the district code for the School that does not offer a magnet program in the city of Fresno?",
"evidence": "When magent is equal to 0 in the database, it means ths school doesn't offer a magnet program.",
"SQL": "SELECT T1.`District Code` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.City = 'Fresno' AND T2.Magnet = 0",
"difficulty": "simple"
},
{
"question_id": 72,
"db_id": "california_schools",
"question": "How many students from the ages of 5 to 17 are enrolled at the State Special School school in Fremont for the 2014-2015 academic year?",
"evidence": "State Special School means EdOpsCode = 'SSS'",
"SQL": "SELECT T1.`Enrollment (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.EdOpsCode = 'SSS' AND T2.City = 'Fremont' AND T1.`Academic Year` BETWEEN 2014 AND 2015",
"difficulty": "moderate"
},
{
"question_id": 73,
"db_id": "california_schools",
"question": "What is the free or reduced price meal count for ages 5 to 17 in the Youth Authority School with a mailing street address of PO Box 1040?",
"evidence": "",
"SQL": "SELECT T1.`FRPM Count (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.MailStreet = 'PO Box 1040' AND T2.SOCType = 'Youth Authority Facilities'",
"difficulty": "simple"
},
{
"question_id": 74,
"db_id": "california_schools",
"question": "What is the lowest grade for the District Special Education Consortia School with National Center for Educational Statistics school district identification number of 0613360?",
"evidence": "District Special Education Consortia School refers to EdOpsCode = 'SPECON'.",
"SQL": "SELECT MIN(T1.`Low Grade`) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.NCESDist = '0613360' AND T2.EdOpsCode = 'SPECON'",
"difficulty": "moderate"
},
{
"question_id": 75,
"db_id": "california_schools",
"question": "What is the educational level name for the schools with Breakfast Provision 2 in county code 37? Indicate the name of the school.",
"evidence": "",
"SQL": "SELECT T2.EILName, T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`NSLP Provision Status` = 'Breakfast Provision 2' AND T1.`County Code` = 37",
"difficulty": "simple"
},
{
"question_id": 76,
"db_id": "california_schools",
"question": "What is the city location of the high school level school with Lunch Provision 2 whose lowest grade is 9 and the highest grade is 12 in the county of Merced?",
"evidence": "High school can be represented as EILCode = 'HS'",
"SQL": "SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`NSLP Provision Status` = 'Lunch Provision 2' AND T2.County = 'Merced' AND T1.`Low Grade` = 9 AND T1.`High Grade` = 12 AND T2.EILCode = 'HS'",
"difficulty": "moderate"
},
{
"question_id": 77,
"db_id": "california_schools",
"question": "Which schools served a grade span of Kindergarten to 9th grade in the county of Los Angeles and what is its Percent (%) Eligible FRPM (Ages 5-17)?",
"evidence": "Percent (%) Eligible FRPM (Ages 5-17) can be acquired by `FRPM Count (Ages 5-17)` / `Enrollment (Ages 5-17)` * 100",
"SQL": "SELECT T2.School, T1.`FRPM Count (Ages 5-17)` * 100 / T1.`Enrollment (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.GSserved = 'K-9'",
"difficulty": "moderate"
},
{
"question_id": 78,
"db_id": "california_schools",
"question": "What is the most common type of grade span served in the city of Adelanto?",
"evidence": "",
"SQL": "SELECT GSserved FROM schools WHERE City = 'Adelanto' GROUP BY GSserved ORDER BY COUNT(GSserved) DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 79,
"db_id": "california_schools",
"question": "Between San Diego and Santa Barbara, which county offers the most number of schools that does not offer physical building? Indicate the amount.",
"evidence": "'Does not offer physical building' means Virtual = F in the database.",
"SQL": "SELECT County, COUNT(Virtual) FROM schools WHERE (County = 'San Diego' OR County = 'Santa Barbara') AND Virtual = 'F' GROUP BY County ORDER BY COUNT(Virtual) DESC LIMIT 1",
"difficulty": "moderate"
},
{
"question_id": 80,
"db_id": "california_schools",
"question": "What is the school type of the school with the highest latitude? Indicate the name of the school as well as the latitude coordinates.",
"evidence": "",
"SQL": "SELECT T1.`School Type`, T1.`School Name`, T2.Latitude FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T2.Latitude DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 81,
"db_id": "california_schools",
"question": "In which city can you find the school in the state of California with the lowest latitude coordinates and what is its lowest grade? Indicate the school name.",
"evidence": "State of California refers to state = 'CA'",
"SQL": "SELECT T2.City, T1.`Low Grade`, T1.`School Name` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.State = 'CA' ORDER BY T2.Latitude ASC LIMIT 1",
"difficulty": "moderate"
},
{
"question_id": 82,
"db_id": "california_schools",
"question": "What is the grade span offered in the school with the highest longitude?",
"evidence": "the highest longitude refers to the school with the maximum absolute longitude value.",
"SQL": "SELECT GSoffered FROM schools ORDER BY ABS(longitude) DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 83,
"db_id": "california_schools",
"question": "Of the schools that offers a magnet program serving a grade span of Kindergarten to 8th grade, how many offers Multiple Provision Types? List the number of cities that offers a Kindergarten to 8th grade span and indicate how many schools are there serving such grade span for each city.",
"evidence": "Kindergarten to 8th grade refers to K-8; 'Offers a magnet program' means Magnet = 1; Multiple Provision Types refers to `NSLP Provision Status` = 'Multiple Provision Types'",
"SQL": "SELECT T2.City, COUNT(T2.CDSCode) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.Magnet = 1 AND T2.GSoffered = 'K-8' AND T1.`NSLP Provision Status` = 'Multiple Provision Types' GROUP BY T2.City",
"difficulty": "challenging"
},
{
"question_id": 84,
"db_id": "california_schools",
"question": "What are the two most common first names among the school administrators? Indicate the district to which they administer.",
"evidence": "",
"SQL": "SELECT DISTINCT T1.AdmFName1, T1.District FROM schools AS T1 INNER JOIN ( SELECT admfname1 FROM schools GROUP BY admfname1 ORDER BY COUNT(admfname1) DESC LIMIT 2 ) AS T2 ON T1.AdmFName1 = T2.admfname1",
"difficulty": "simple"
},
{
"question_id": 85,
"db_id": "california_schools",
"question": "What is the Percent (%) Eligible Free (K-12) in the school administered by an administrator whose first name is Alusine. List the district code of the school.",
"evidence": "Percent (%) Eligible Free (K-12) = `Free Meal Count (K-12)` / `Enrollment (K-12)` * 100%",
"SQL": "SELECT T1.`Free Meal Count (K-12)` * 100 / T1.`Enrollment (K-12)`, T1.`District Code` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.AdmFName1 = 'Alusine'",
"difficulty": "moderate"
},
{
"question_id": 86,
"db_id": "california_schools",
"question": "What is the administrator's last name that oversees the school with Charter number 40? Indicate the district, the county where the school is situated, and the name of the school.",
"evidence": "",
"SQL": "SELECT AdmLName1, District, County, School FROM schools WHERE CharterNum = '0040'",
"difficulty": "simple"
},
{
"question_id": 87,
"db_id": "california_schools",
"question": "What are the valid e-mail addresses of the administrator of the school located in the San Bernardino county, City of San Bernardino City Unified that opened between 1/1/2009 to 12/31/2010 whose school types are public Intermediate/Middle Schools and Unified Schools?",
"evidence": "Intermediate/Middle Schools refers to SOC = 62; Unified School refers to DOC = 54; years between 2009 and 2010 can refer to 'between 1/1/2009 to 12/31/2010'",
"SQL": "SELECT T2.AdmEmail1, T2.AdmEmail2 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'San Bernardino' AND T2.City = 'San Bernardino' AND T2.DOC = 54 AND strftime('%Y', T2.OpenDate) BETWEEN '2009' AND '2010' AND T2.SOC = 62",
"difficulty": "challenging"
},
{
"question_id": 88,
"db_id": "california_schools",
"question": "What is the administrator's email address for the school with the highest number of test takers who received SAT scores of at least 1500?Provide the name of the school.",
"evidence": "",
"SQL": "SELECT T2.AdmEmail1, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 89,
"db_id": "financial",
"question": "How many accounts who choose issuance after transaction are staying in East Bohemia region?",
"evidence": "A3 contains the data of region; 'POPLATEK PO OBRATU' represents for 'issuance after transaction'.",
"SQL": "SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'east Bohemia' AND T2.frequency = 'POPLATEK PO OBRATU'",
"difficulty": "moderate"
},
{
"question_id": 90,
"db_id": "financial",
"question": "How many accounts who have region in Prague are eligible for loans?",
"evidence": "A3 contains the data of region",
"SQL": "SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T1.district_id = T3.district_id WHERE T3.A3 = 'Prague'",
"difficulty": "simple"
},
{
"question_id": 91,
"db_id": "financial",
"question": "The average unemployment ratio of 1995 and 1996, which one has higher percentage?",
"evidence": "A12 refers to unemploymant rate 1995; A13 refers to unemploymant rate 1996",
"SQL": "SELECT DISTINCT IIF(AVG(A13) > AVG(A12), '1996', '1995') FROM district",
"difficulty": "simple"
},
{
"question_id": 92,
"db_id": "financial",
"question": "List out the no. of districts that have female average salary is more than 6000 but less than 10000?",
"evidence": "A11 refers to average salary; Female mapps to gender = 'F'",
"SQL": "SELECT COUNT(DISTINCT T2.district_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A11 BETWEEN 6000 AND 10000",
"difficulty": "simple"
},
{
"question_id": 93,
"db_id": "financial",
"question": "How many male customers who are living in North Bohemia have average salary greater than 8000?",
"evidence": "Male means that gender = 'M'; A3 refers to region; A11 pertains to average salary.",
"SQL": "SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A3 = 'north Bohemia' AND T2.A11 > 8000",
"difficulty": "moderate"
},
{
"question_id": 94,
"db_id": "financial",
"question": "List out the account numbers of female clients who are oldest and has lowest average salary, calculate the gap between this lowest average salary with the highest average salary?",
"evidence": "Female means gender = 'F'; A11 refers to average salary; Gap = highest average salary - lowest average salary; If the person A's birthdate > B's birthdate, it means that person B is order than person A.",
"SQL": "SELECT T1.account_id , ( SELECT MAX(A11) - MIN(A11) FROM district ) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T1.account_id = T3.account_id INNER JOIN client AS T4 ON T3.client_id = T4.client_id WHERE T2.district_id = ( SELECT district_id FROM client WHERE gender = 'F' ORDER BY birth_date ASC LIMIT 1 ) ORDER BY T2.A11 DESC LIMIT 1",
"difficulty": "challenging"
},
{
"question_id": 95,
"db_id": "financial",
"question": "List out the account numbers of clients who are youngest and have highest average salary?",
"evidence": "If the person A's birthdate < B's birthdate, it means that person B is younger than person A; A11 refers to average salary",
"SQL": "SELECT T1.account_id FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id INNER JOIN client AS T3 ON T2.client_id = T3.client_id INNER JOIN district AS T4 on T4.district_id = T1.district_id WHERE T2.client_id = ( SELECT client_id FROM client ORDER BY birth_date DESC LIMIT 1) GROUP BY T4.A11, T1.account_id",
"difficulty": "moderate"
},
{
"question_id": 96,
"db_id": "financial",
"question": "How many customers who choose statement of weekly issuance are Owner?",
"evidence": "'POPLATEK TYDNE' stands for weekly issuance",
"SQL": "SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T2.type = 'OWNER' AND T1.frequency = 'POPLATEK TYDNE'",
"difficulty": "simple"
},
{
"question_id": 97,
"db_id": "financial",
"question": "List out the id number of client who choose statement of issuance after transaction are Disponent?",
"evidence": "'POPLATEK PO OBRATU' stands for issuance after transaction",
"SQL": "SELECT T2.client_id FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T1.frequency = 'POPLATEK PO OBRATU' AND T2.type = 'DISPONENT'",
"difficulty": "simple"
},
{
"question_id": 98,
"db_id": "financial",
"question": "Among the accounts who have approved loan date in 1997, list out the accounts that have the lowest approved amount and choose weekly issuance statement.",
"evidence": "'POPLATEK TYDNE' stands for weekly issuance",
"SQL": "SELECT T2.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1997' AND T2.frequency = 'POPLATEK TYDNE' ORDER BY T1.amount LIMIT 1",
"difficulty": "moderate"
},
{
"question_id": 99,
"db_id": "financial",
"question": "Among the accounts who have loan validity more than 12 months, list out the accounts that have the highest approved amount and have account opening date in 1993.",
"evidence": "Loan validity more than 12 months refers to duration > 12",
"SQL": "SELECT T1.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T2.date) = '1993' AND T1.duration > 12 ORDER BY T1.amount DESC LIMIT 1",
"difficulty": "moderate"
},
{
"question_id": 100,
"db_id": "financial",
"question": "Among the account opened, how many female customers who were born before 1950 and stayed in Sokolov?",
"evidence": "Customers refer to clients; Female refers to gender = 'F'; Names of districts appear in column A2",
"SQL": "SELECT COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.gender = 'F' AND STRFTIME('%Y', T2.birth_date) < '1950' AND T1.A2 = 'Sokolov'",
"difficulty": "moderate"
},
{
"question_id": 101,
"db_id": "financial",
"question": "List out the accounts who have the earliest trading date in 1995 ?",
"evidence": "",
"SQL": "SELECT account_id FROM trans WHERE STRFTIME('%Y', date) = '1995' ORDER BY date ASC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 102,
"db_id": "financial",
"question": "State different accounts who have account opening date before 1997 and own an amount of money greater than 3000USD",
"evidence": "",
"SQL": "SELECT DISTINCT T2.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T2.date) < '1997' AND T1.amount > 3000",
"difficulty": "simple"
},
{
"question_id": 103,
"db_id": "financial",
"question": "Which client issued his/her card in 1994/3/3, give his/her client id.",
"evidence": "",
"SQL": "SELECT T2.client_id FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T2.disp_id = T3.disp_id WHERE T3.issued = '1994-03-03'",
"difficulty": "simple"
},
{
"question_id": 104,
"db_id": "financial",
"question": "The transaction of 840 USD happened in 1998/10/14, when was this account opened?",
"evidence": "",
"SQL": "SELECT T1.date FROM account AS T1 INNER JOIN trans AS T2 ON T1.account_id = T2.account_id WHERE T2.amount = 840 AND T2.date = '1998-10-14'",
"difficulty": "simple"
},
{
"question_id": 105,
"db_id": "financial",
"question": "There was a loan approved in 1994/8/25, where was that account opened, give the district Id of the branch.",
"evidence": "",
"SQL": "SELECT T1.district_id FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.date = '1994-08-25'",
"difficulty": "simple"
},
{
"question_id": 106,
"db_id": "financial",
"question": "What is the biggest amount of transaction that the client whose card was opened in 1996/10/21 made?",
"evidence": "",
"SQL": "SELECT T4.amount FROM card AS T1 JOIN disp AS T2 ON T1.disp_id = T2.disp_id JOIN account AS T3 on T2.account_id = T3.account_id JOIN trans AS T4 on T3.account_id = T4.account_id WHERE T1.issued = '1996-10-21' ORDER BY T4.amount DESC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 107,
"db_id": "financial",
"question": "What is the gender of the oldest client who opened his/her account in the highest average salary branch?",
"evidence": "Earlier birthdate refers to older age; A11 refers to average salary",
"SQL": "SELECT T2.gender FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id ORDER BY T1.A11 DESC, T2.birth_date ASC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 108,
"db_id": "financial",
"question": "For the client who applied the biggest loan, what was his/her first amount of transaction after opened the account?",
"evidence": "",
"SQL": "SELECT T3.amount FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id ORDER BY T1.amount DESC, T3.date ASC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 109,
"db_id": "financial",
"question": "How many clients opened their accounts in Jesenik branch were women?",
"evidence": "A2 has region names; Woman and female share the same meaning; female refers to gender = 'F'",
"SQL": "SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A2 = 'Jesenik'",
"difficulty": "simple"
},
{
"question_id": 110,
"db_id": "financial",
"question": "What is the disposition id of the client who made 5100 USD transaction in 1998/9/2?",
"evidence": "",
"SQL": "SELECT T1.disp_id FROM disp AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.date='1997-08-20' AND T3.amount = 5100",
"difficulty": "simple"
},
{
"question_id": 111,
"db_id": "financial",
"question": "How many accounts were opened in Litomerice in 1996?",
"evidence": "A2 refers to district name; Litomerice is one of district names.",
"SQL": "SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T2.date) = '1996' AND T1.A2 = 'Litomerice'",
"difficulty": "simple"
},
{
"question_id": 112,
"db_id": "financial",
"question": "For the female client who was born in 1976/1/29, which district did she opened her account?",
"evidence": "Female refers to gender = 'F'; A2 refers to district names",
"SQL": "SELECT T1.A2 FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.birth_date = '1976-01-29' AND T2.gender = 'F'",
"difficulty": "simple"
},
{
"question_id": 113,
"db_id": "financial",
"question": "For the client who applied 98832 USD loan in 1996/1/3, when was his/her birthday?",
"evidence": "",
"SQL": "SELECT T4.birth_date FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN disp AS T3 ON T2.account_id = T3.account_id INNER JOIN client AS T4 ON T3.client_id = T4.client_id WHERE T1.date = '1996-01-03' AND T1.amount = 98832",
"difficulty": "simple"
},
{
"question_id": 114,
"db_id": "financial",
"question": "For the first client who opened his/her account in Prague, what is his/her account ID?",
"evidence": "A3 stands for region names",
"SQL": "SELECT T1.account_id FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'Prague' ORDER BY T1.date ASC LIMIT 1",
"difficulty": "simple"
},
{
"question_id": 115,
"db_id": "financial",
"question": "For the branch which located in the south Bohemia with biggest number of inhabitants, what is the percentage of the male clients?",
"evidence": "Percentage of the male clients = DIVIDE(COUNT(male clients), COUNT(clients)) * 100; Male refers to gender = 'M', A3 is the region name. A4 contains the information about inhabitants.",
"SQL": "SELECT CAST(SUM(T1.gender = 'M') AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'south Bohemia' GROUP BY T2.A4 ORDER BY T2.A4 DESC LIMIT 1",
"difficulty": "challenging"
},
{
"question_id": 116,
"db_id": "financial",
"question": "For the client whose loan was approved first in 1993/7/5, what is the increase rate of his/her account balance from 1993/3/22 to 1998/12/27?",
"evidence": "Increase rate of his/her account balance = [(balance of date A - balance of date B) / balance of Date B] * 100%",
"SQL": "SELECT CAST((SUM(IIF(T3.date = '1998-12-27', T3.balance, 0)) - SUM(IIF(T3.date = '1993-03-22', T3.balance, 0))) AS REAL) * 100 / SUM(IIF(T3.date = '1993-03-22', T3.balance, 0)) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN trans AS T3 ON T3.account_id = T2.account_id WHERE T1.date = '1993-07-05'",
"difficulty": "challenging"
},
{
"question_id": 117,
"db_id": "financial",
"question": "What is the percentage of loan amount that has been fully paid with no issue.",
"evidence": "Loan paid with no issue means contract finished, no problems; status = 'A' means contract finished, no problems; Percentage of accounts by condition = [(total(amount) & condition) / (total amount)] * 100%",
"SQL": "SELECT (CAST(SUM(CASE WHEN status = 'A' THEN amount ELSE 0 END) AS REAL) * 100) / SUM(amount) FROM loan",
"difficulty": "moderate"
},
{
"question_id": 118,
"db_id": "financial",
"question": "For loan amount less than USD100,000, what is the percentage of accounts that is still running with no issue.",
"evidence": "Status = 'C' stands for running contract, ok so far; Percentage of accounts by condition = [(total(amount) & condition) / (total amount)] * 100.",
"SQL": "SELECT CAST(SUM(status = 'C') AS REAL) * 100 / COUNT(account_id) FROM loan WHERE amount < 100000",
"difficulty": "moderate"
},
{
"question_id": 119,
"db_id": "financial",
"question": "For accounts in 1993 with statement issued after transaction, list the account ID, district name and district region.",
"evidence": "Records about district names could be found in A2; A3 contains the information about regions. 'POPLATEK PO OBRATU' stands for issuance after transaction",
"SQL": "SELECT T1.account_id, T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.frequency = 'POPLATEK PO OBRATU' AND STRFTIME('%Y', T1.date)= '1993'",
"difficulty": "moderate"
},
{
"question_id": 120,
"db_id": "financial",
"question": "From Year 1995 to 2000, who are the accounts holders from 'east Bohemia'. State the account ID the frequency of statement issuance.",
"evidence": "Accounts holder refers to the person who own this account.",
"SQL": "SELECT T1.account_id, T1.frequency FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'east Bohemia' AND STRFTIME('%Y', T1.date) BETWEEN '1995' AND '2000'",
"difficulty": "moderate"
},
{
"question_id": 121,
"db_id": "financial",
"question": "List account ID and account opening date for accounts from 'Prachatice'.",
"evidence": "A2 refers to the names of districts.",
"SQL": "SELECT T1.account_id, T1.date FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A2 = 'Prachatice'",
"difficulty": "simple"
},
{
"question_id": 122,
"db_id": "financial",
"question": "State the district and region for loan ID '4990'.",
"evidence": "A2, A3 contains the information about district and region respectively.",
"SQL": "SELECT T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.loan_id = 4990",
"difficulty": "simple"
},
{
"question_id": 123,
"db_id": "financial",
"question": "Provide the account ID, district and region for loan amount greater than USD300,000.",
"evidence": "A2 contains district names and A3 contains region names.",
"SQL": "SELECT T1.account_id, T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.amount > 300000",
"difficulty": "simple"
},
{
"question_id": 124,
"db_id": "financial",
"question": "List the loan ID, district and average salary for loan with duration of 60 months.",
"evidence": "A3 refers to regions; A11 refers to average salary",
"SQL": "SELECT T3.loan_id, T2.A2, T2.A11 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.duration = 60",
"difficulty": "simple"