DeanGumas commited on
Commit
c821721
·
1 Parent(s): 825751a

Ran first 1 epoch training run, trying to extract private data, no luck yet :(

Browse files
finetune_model.ipynb CHANGED
The diff for this file is too large to render. See raw diff
 
finetuned-model-16-quickrun/checkpoint-50/README.md ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: ./deepseek-coder-1.3b-instruct
3
+ library_name: peft
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+
11
+
12
+ ## Model Details
13
+
14
+ ### Model Description
15
+
16
+ <!-- Provide a longer summary of what this model is. -->
17
+
18
+
19
+
20
+ - **Developed by:** [More Information Needed]
21
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
200
+ ### Framework versions
201
+
202
+ - PEFT 0.15.1
finetuned-model-16-quickrun/checkpoint-50/adapter_config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "./deepseek-coder-1.3b-instruct",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 32,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.0,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "r": 16,
24
+ "rank_pattern": {},
25
+ "revision": null,
26
+ "target_modules": [
27
+ "k_proj",
28
+ "down_proj",
29
+ "q_proj",
30
+ "o_proj",
31
+ "up_proj",
32
+ "v_proj",
33
+ "gate_proj"
34
+ ],
35
+ "task_type": "CAUSAL_LM",
36
+ "trainable_token_indices": null,
37
+ "use_dora": false,
38
+ "use_rslora": false
39
+ }
finetuned-model-16-quickrun/checkpoint-50/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:447bb29ef42ce960f93de8c2bf749cd4bfc8fe6c502fd1e0c461ac0959f22b6a
3
+ size 322342688
finetuned-model-16-quickrun/checkpoint-50/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:687e07446123da14128657561026777fff124bdc9d450e0b391ddbd5c92245a8
3
+ size 120213058
finetuned-model-16-quickrun/checkpoint-50/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c44141bbdc09951afac7e1120c543329e05011264f0246580d2c7b808a155c7
3
+ size 14244
finetuned-model-16-quickrun/checkpoint-50/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b92a28242b992540611736c67043178f3349d002db17eefcc7d9343caedcdda
3
+ size 1064
finetuned-model-16-quickrun/checkpoint-50/special_tokens_map.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ {
4
+ "content": "<|endofsql|>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ }
10
+ ],
11
+ "bos_token": {
12
+ "content": "<|begin▁of▁sentence|>",
13
+ "lstrip": false,
14
+ "normalized": true,
15
+ "rstrip": false,
16
+ "single_word": false
17
+ },
18
+ "eos_token": "<|endofsql|>",
19
+ "pad_token": {
20
+ "content": "<|end▁of▁sentence|>",
21
+ "lstrip": false,
22
+ "normalized": true,
23
+ "rstrip": false,
24
+ "single_word": false
25
+ }
26
+ }
finetuned-model-16-quickrun/checkpoint-50/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
finetuned-model-16-quickrun/checkpoint-50/tokenizer_config.json ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "32000": {
7
+ "content": "õ",
8
+ "lstrip": false,
9
+ "normalized": true,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": false
13
+ },
14
+ "32001": {
15
+ "content": "÷",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": false
21
+ },
22
+ "32002": {
23
+ "content": "Á",
24
+ "lstrip": false,
25
+ "normalized": true,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": false
29
+ },
30
+ "32003": {
31
+ "content": "ý",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": false
37
+ },
38
+ "32004": {
39
+ "content": "À",
40
+ "lstrip": false,
41
+ "normalized": true,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": false
45
+ },
46
+ "32005": {
47
+ "content": "ÿ",
48
+ "lstrip": false,
49
+ "normalized": true,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": false
53
+ },
54
+ "32006": {
55
+ "content": "ø",
56
+ "lstrip": false,
57
+ "normalized": true,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": false
61
+ },
62
+ "32007": {
63
+ "content": "ú",
64
+ "lstrip": false,
65
+ "normalized": true,
66
+ "rstrip": false,
67
+ "single_word": false,
68
+ "special": false
69
+ },
70
+ "32008": {
71
+ "content": "þ",
72
+ "lstrip": false,
73
+ "normalized": true,
74
+ "rstrip": false,
75
+ "single_word": false,
76
+ "special": false
77
+ },
78
+ "32009": {
79
+ "content": "ü",
80
+ "lstrip": false,
81
+ "normalized": true,
82
+ "rstrip": false,
83
+ "single_word": false,
84
+ "special": false
85
+ },
86
+ "32010": {
87
+ "content": "ù",
88
+ "lstrip": false,
89
+ "normalized": true,
90
+ "rstrip": false,
91
+ "single_word": false,
92
+ "special": false
93
+ },
94
+ "32011": {
95
+ "content": "ö",
96
+ "lstrip": false,
97
+ "normalized": true,
98
+ "rstrip": false,
99
+ "single_word": false,
100
+ "special": false
101
+ },
102
+ "32012": {
103
+ "content": "û",
104
+ "lstrip": false,
105
+ "normalized": true,
106
+ "rstrip": false,
107
+ "single_word": false,
108
+ "special": false
109
+ },
110
+ "32013": {
111
+ "content": "<|begin▁of▁sentence|>",
112
+ "lstrip": false,
113
+ "normalized": true,
114
+ "rstrip": false,
115
+ "single_word": false,
116
+ "special": true
117
+ },
118
+ "32014": {
119
+ "content": "<|end▁of▁sentence|>",
120
+ "lstrip": false,
121
+ "normalized": true,
122
+ "rstrip": false,
123
+ "single_word": false,
124
+ "special": true
125
+ },
126
+ "32015": {
127
+ "content": "<|fim▁hole|>",
128
+ "lstrip": false,
129
+ "normalized": true,
130
+ "rstrip": false,
131
+ "single_word": false,
132
+ "special": false
133
+ },
134
+ "32016": {
135
+ "content": "<|fim▁begin|>",
136
+ "lstrip": false,
137
+ "normalized": true,
138
+ "rstrip": false,
139
+ "single_word": false,
140
+ "special": false
141
+ },
142
+ "32017": {
143
+ "content": "<|fim▁end|>",
144
+ "lstrip": false,
145
+ "normalized": true,
146
+ "rstrip": false,
147
+ "single_word": false,
148
+ "special": false
149
+ },
150
+ "32018": {
151
+ "content": "<pad>",
152
+ "lstrip": false,
153
+ "normalized": true,
154
+ "rstrip": false,
155
+ "single_word": false,
156
+ "special": false
157
+ },
158
+ "32019": {
159
+ "content": "<|User|>",
160
+ "lstrip": false,
161
+ "normalized": true,
162
+ "rstrip": false,
163
+ "single_word": false,
164
+ "special": false
165
+ },
166
+ "32020": {
167
+ "content": "<|Assistant|>",
168
+ "lstrip": false,
169
+ "normalized": true,
170
+ "rstrip": false,
171
+ "single_word": false,
172
+ "special": false
173
+ },
174
+ "32021": {
175
+ "content": "<|EOT|>",
176
+ "lstrip": false,
177
+ "normalized": true,
178
+ "rstrip": false,
179
+ "single_word": false,
180
+ "special": true
181
+ },
182
+ "32022": {
183
+ "content": "<|endofsql|>",
184
+ "lstrip": false,
185
+ "normalized": false,
186
+ "rstrip": false,
187
+ "single_word": false,
188
+ "special": true
189
+ }
190
+ },
191
+ "additional_special_tokens": [
192
+ "<|endofsql|>"
193
+ ],
194
+ "bos_token": "<|begin▁of▁sentence|>",
195
+ "chat_template": "{% if not add_generation_prompt is defined %}\n{% set add_generation_prompt = false %}\n{% endif %}\n{%- set ns = namespace(found=false) -%}\n{%- for message in messages -%}\n {%- if message['role'] == 'system' -%}\n {%- set ns.found = true -%}\n {%- endif -%}\n{%- endfor -%}\n{{bos_token}}{%- if not ns.found -%}\n{{'You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer\\n'}}\n{%- endif %}\n{%- for message in messages %}\n {%- if message['role'] == 'system' %}\n{{ message['content'] }}\n {%- else %}\n {%- if message['role'] == 'user' %}\n{{'### Instruction:\\n' + message['content'] + '\\n'}}\n {%- else %}\n{{'### Response:\\n' + message['content'] + '\\n<|EOT|>\\n'}}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{% if add_generation_prompt %}\n{{'### Response:'}}\n{% endif %}",
196
+ "clean_up_tokenization_spaces": false,
197
+ "eos_token": "<|endofsql|>",
198
+ "extra_special_tokens": {},
199
+ "legacy": true,
200
+ "model_max_length": 16384,
201
+ "pad_token": "<|end▁of▁sentence|>",
202
+ "sp_model_kwargs": {},
203
+ "tokenizer_class": "LlamaTokenizerFast",
204
+ "unk_token": null,
205
+ "use_default_system_prompt": false
206
+ }
finetuned-model-16-quickrun/checkpoint-50/trainer_state.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 50,
3
+ "best_metric": 0.35299259424209595,
4
+ "best_model_checkpoint": "./finetuned-model-16\\checkpoint-50",
5
+ "epoch": 0.9950248756218906,
6
+ "eval_steps": 500,
7
+ "global_step": 50,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.9950248756218906,
14
+ "grad_norm": 0.4966062009334564,
15
+ "learning_rate": 0.0,
16
+ "loss": 0.7443,
17
+ "step": 50
18
+ },
19
+ {
20
+ "epoch": 0.9950248756218906,
21
+ "eval_loss": 0.35299259424209595,
22
+ "eval_runtime": 267.4895,
23
+ "eval_samples_per_second": 0.561,
24
+ "eval_steps_per_second": 0.561,
25
+ "step": 50
26
+ }
27
+ ],
28
+ "logging_steps": 50,
29
+ "max_steps": 50,
30
+ "num_input_tokens_seen": 0,
31
+ "num_train_epochs": 1,
32
+ "save_steps": 500,
33
+ "stateful_callbacks": {
34
+ "EarlyStoppingCallback": {
35
+ "args": {
36
+ "early_stopping_patience": 2,
37
+ "early_stopping_threshold": 0.0
38
+ },
39
+ "attributes": {
40
+ "early_stopping_patience_counter": 0
41
+ }
42
+ },
43
+ "TrainerControl": {
44
+ "args": {
45
+ "should_epoch_stop": false,
46
+ "should_evaluate": false,
47
+ "should_log": false,
48
+ "should_save": true,
49
+ "should_training_stop": true
50
+ },
51
+ "attributes": {}
52
+ }
53
+ },
54
+ "total_flos": 1.96165723226112e+16,
55
+ "train_batch_size": 1,
56
+ "trial_name": null,
57
+ "trial_params": null
58
+ }
finetuned-model-16-quickrun/checkpoint-50/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ff23ed73c087fd1026b81e84e5f404db9716ba933363e1e510e30d214290d81
3
+ size 5368
finetuned-model-16-quickrun/config.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 32013,
8
+ "eos_token_id": 32021,
9
+ "head_dim": 128,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 5504,
14
+ "max_position_embeddings": 16384,
15
+ "mlp_bias": false,
16
+ "model_type": "llama",
17
+ "num_attention_heads": 16,
18
+ "num_hidden_layers": 24,
19
+ "num_key_value_heads": 16,
20
+ "pretraining_tp": 1,
21
+ "quantization_config": {
22
+ "_load_in_4bit": false,
23
+ "_load_in_8bit": true,
24
+ "bnb_4bit_compute_dtype": "float32",
25
+ "bnb_4bit_quant_storage": "uint8",
26
+ "bnb_4bit_quant_type": "fp4",
27
+ "bnb_4bit_use_double_quant": false,
28
+ "llm_int8_enable_fp32_cpu_offload": false,
29
+ "llm_int8_has_fp16_weight": false,
30
+ "llm_int8_skip_modules": null,
31
+ "llm_int8_threshold": 6.0,
32
+ "load_in_4bit": false,
33
+ "load_in_8bit": true,
34
+ "quant_method": "bitsandbytes"
35
+ },
36
+ "rms_norm_eps": 1e-06,
37
+ "rope_scaling": {
38
+ "factor": 4.0,
39
+ "rope_type": "linear",
40
+ "type": "linear"
41
+ },
42
+ "rope_theta": 100000,
43
+ "tie_word_embeddings": false,
44
+ "torch_dtype": "float16",
45
+ "transformers_version": "4.50.3",
46
+ "use_cache": true,
47
+ "vocab_size": 32023
48
+ }
finetuned-model-16-quickrun/generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 32013,
4
+ "eos_token_id": 32021,
5
+ "transformers_version": "4.50.3"
6
+ }
finetuned-model-16-quickrun/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b931d2037af193bb004b2f81fd91fb73dec688bde7120d104029d1e00af1fda
3
+ size 1478884408
finetuned-model-16-quickrun/runs/Nov19_17-05-54_DESKTOP-SMJC97K/events.out.tfevents.1763600789.DESKTOP-SMJC97K.22084.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:810f30a3832dcec2fa8827b656837d10c1ef5c97fdc3696ff9f7e42031dbeb9e
3
+ size 6490
finetuned-model-16-quickrun/special_tokens_map.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ {
4
+ "content": "<|endofsql|>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ }
10
+ ],
11
+ "bos_token": {
12
+ "content": "<|begin▁of▁sentence|>",
13
+ "lstrip": false,
14
+ "normalized": true,
15
+ "rstrip": false,
16
+ "single_word": false
17
+ },
18
+ "eos_token": "<|endofsql|>",
19
+ "pad_token": {
20
+ "content": "<|end▁of▁sentence|>",
21
+ "lstrip": false,
22
+ "normalized": true,
23
+ "rstrip": false,
24
+ "single_word": false
25
+ }
26
+ }
finetuned-model-16-quickrun/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
finetuned-model-16-quickrun/tokenizer_config.json ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "32000": {
7
+ "content": "õ",
8
+ "lstrip": false,
9
+ "normalized": true,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": false
13
+ },
14
+ "32001": {
15
+ "content": "÷",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": false
21
+ },
22
+ "32002": {
23
+ "content": "Á",
24
+ "lstrip": false,
25
+ "normalized": true,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": false
29
+ },
30
+ "32003": {
31
+ "content": "ý",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": false
37
+ },
38
+ "32004": {
39
+ "content": "À",
40
+ "lstrip": false,
41
+ "normalized": true,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": false
45
+ },
46
+ "32005": {
47
+ "content": "ÿ",
48
+ "lstrip": false,
49
+ "normalized": true,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": false
53
+ },
54
+ "32006": {
55
+ "content": "ø",
56
+ "lstrip": false,
57
+ "normalized": true,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": false
61
+ },
62
+ "32007": {
63
+ "content": "ú",
64
+ "lstrip": false,
65
+ "normalized": true,
66
+ "rstrip": false,
67
+ "single_word": false,
68
+ "special": false
69
+ },
70
+ "32008": {
71
+ "content": "þ",
72
+ "lstrip": false,
73
+ "normalized": true,
74
+ "rstrip": false,
75
+ "single_word": false,
76
+ "special": false
77
+ },
78
+ "32009": {
79
+ "content": "ü",
80
+ "lstrip": false,
81
+ "normalized": true,
82
+ "rstrip": false,
83
+ "single_word": false,
84
+ "special": false
85
+ },
86
+ "32010": {
87
+ "content": "ù",
88
+ "lstrip": false,
89
+ "normalized": true,
90
+ "rstrip": false,
91
+ "single_word": false,
92
+ "special": false
93
+ },
94
+ "32011": {
95
+ "content": "ö",
96
+ "lstrip": false,
97
+ "normalized": true,
98
+ "rstrip": false,
99
+ "single_word": false,
100
+ "special": false
101
+ },
102
+ "32012": {
103
+ "content": "û",
104
+ "lstrip": false,
105
+ "normalized": true,
106
+ "rstrip": false,
107
+ "single_word": false,
108
+ "special": false
109
+ },
110
+ "32013": {
111
+ "content": "<|begin▁of▁sentence|>",
112
+ "lstrip": false,
113
+ "normalized": true,
114
+ "rstrip": false,
115
+ "single_word": false,
116
+ "special": true
117
+ },
118
+ "32014": {
119
+ "content": "<|end▁of▁sentence|>",
120
+ "lstrip": false,
121
+ "normalized": true,
122
+ "rstrip": false,
123
+ "single_word": false,
124
+ "special": true
125
+ },
126
+ "32015": {
127
+ "content": "<|fim▁hole|>",
128
+ "lstrip": false,
129
+ "normalized": true,
130
+ "rstrip": false,
131
+ "single_word": false,
132
+ "special": false
133
+ },
134
+ "32016": {
135
+ "content": "<|fim▁begin|>",
136
+ "lstrip": false,
137
+ "normalized": true,
138
+ "rstrip": false,
139
+ "single_word": false,
140
+ "special": false
141
+ },
142
+ "32017": {
143
+ "content": "<|fim▁end|>",
144
+ "lstrip": false,
145
+ "normalized": true,
146
+ "rstrip": false,
147
+ "single_word": false,
148
+ "special": false
149
+ },
150
+ "32018": {
151
+ "content": "<pad>",
152
+ "lstrip": false,
153
+ "normalized": true,
154
+ "rstrip": false,
155
+ "single_word": false,
156
+ "special": false
157
+ },
158
+ "32019": {
159
+ "content": "<|User|>",
160
+ "lstrip": false,
161
+ "normalized": true,
162
+ "rstrip": false,
163
+ "single_word": false,
164
+ "special": false
165
+ },
166
+ "32020": {
167
+ "content": "<|Assistant|>",
168
+ "lstrip": false,
169
+ "normalized": true,
170
+ "rstrip": false,
171
+ "single_word": false,
172
+ "special": false
173
+ },
174
+ "32021": {
175
+ "content": "<|EOT|>",
176
+ "lstrip": false,
177
+ "normalized": true,
178
+ "rstrip": false,
179
+ "single_word": false,
180
+ "special": true
181
+ },
182
+ "32022": {
183
+ "content": "<|endofsql|>",
184
+ "lstrip": false,
185
+ "normalized": false,
186
+ "rstrip": false,
187
+ "single_word": false,
188
+ "special": true
189
+ }
190
+ },
191
+ "additional_special_tokens": [
192
+ "<|endofsql|>"
193
+ ],
194
+ "bos_token": "<|begin▁of▁sentence|>",
195
+ "chat_template": "{% if not add_generation_prompt is defined %}\n{% set add_generation_prompt = false %}\n{% endif %}\n{%- set ns = namespace(found=false) -%}\n{%- for message in messages -%}\n {%- if message['role'] == 'system' -%}\n {%- set ns.found = true -%}\n {%- endif -%}\n{%- endfor -%}\n{{bos_token}}{%- if not ns.found -%}\n{{'You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer\\n'}}\n{%- endif %}\n{%- for message in messages %}\n {%- if message['role'] == 'system' %}\n{{ message['content'] }}\n {%- else %}\n {%- if message['role'] == 'user' %}\n{{'### Instruction:\\n' + message['content'] + '\\n'}}\n {%- else %}\n{{'### Response:\\n' + message['content'] + '\\n<|EOT|>\\n'}}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{% if add_generation_prompt %}\n{{'### Response:'}}\n{% endif %}",
196
+ "clean_up_tokenization_spaces": false,
197
+ "eos_token": "<|endofsql|>",
198
+ "extra_special_tokens": {},
199
+ "legacy": true,
200
+ "model_max_length": 16384,
201
+ "pad_token": "<|end▁of▁sentence|>",
202
+ "sp_model_kwargs": {},
203
+ "tokenizer_class": "LlamaTokenizerFast",
204
+ "unk_token": null,
205
+ "use_default_system_prompt": false
206
+ }
training-data/test_set.tsv CHANGED
@@ -1,151 +1,151 @@
1
- natural_query sql_query result
2
- What is the average number of fg_pct in home games by the Chicago Bulls? SELECT AVG(fg_pct_home) FROM game WHERE team_name_home = 'Chicago Bulls'; 0.4636694306246544
3
- How many lead changes occurred in games where the Denver Nuggets played away? SELECT SUM(lead_changes) as total_lead_changes FROM other_stats WHERE team_abbreviation_away = 'DEN'; 5828.0
4
- Which team had the most away games where they had more offensive than defensive rebounds? SELECT team_abbreviation_away FROM game WHERE oreb_away > dreb_away GROUP BY team_abbreviation_away ORDER BY COUNT(*) DESC LIMIT 1; ATL
5
- What is the maximum number of team rebounds recorded by the Dallas Mavericks in away games where they committed more than 20 fouls? SELECT MAX(o.team_rebounds_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_away = 'DAL' AND g.pf_away > 20 AND g.season_id = '22021'; 16
6
- What was the average margin of victory for the Miami Heat during the 2013 NBA season? SELECT AVG(victory_margin) AS avg_victory_margin FROM ( SELECT plus_minus_home AS victory_margin FROM game WHERE team_name_home = 'Miami Heat' AND wl_home = 'W' AND season_id = '22013' UNION ALL SELECT plus_minus_away AS victory_margin FROM game WHERE team_name_away = 'Miami Heat' AND wl_away = 'W' AND season_id = '22013' ) AS victories 11.48148148
7
- What is the average fast break points scored by the Philadelphia 76ers at home during the 2018 season? SELECT AVG(os.pts_fb_home) AS avg_fast_break FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_abbreviation_home = 'PHI' AND g.season_id = '22018'; 16.32352941
8
- Which team has the nickname 'Celtics'? SELECT full_name FROM team WHERE nickname = 'Celtics'; Boston Celtics
9
- How many games did the Milwaukee Bucks play at home during the 2020 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Milwaukee Bucks' AND season_id = '22020'; 36
10
- What is the average second-chance points for Toronto Raptors home games between 2015-2020? SELECT AVG(os.pts_2nd_chance_home) AS avg_second_chance FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_abbreviation_home = 'TOR' AND g.season_id BETWEEN '22015' AND '22020'; 13.07653061
11
- Which team had the most fast break points in a single home game during the 2020 season? SELECT team_name_home, MAX(pts_fb_home) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE game.season_id = '22020'; Houston Rockets|35
12
- What's the average points in the paint for the Boston Celtics in home games where they won by at least 10 points? SELECT AVG(os.pts_paint_home) FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_home = 'Boston Celtics' AND g.plus_minus_home >= 10; 41.85
13
- What is the highest combined total score (home + away) in a single game in the dataset? SELECT game_date, (pts_home + pts_away) AS total_points FROM game ORDER BY total_points DESC LIMIT 1; 2017-02-19 00:00:00|374.0
14
- Which team had the best three-point shooting percentage in home games during the 2020 season? SELECT team_name_home, AVG(fg3_pct_home) AS avg_3pt_pct FROM game WHERE season_id = '22020' GROUP BY team_name_home ORDER BY avg_3pt_pct DESC LIMIT 1; LA Clippers | 0.423777777777778
15
- Which team is located in the state of Indiana? SELECT full_name FROM team WHERE state = 'Indiana'; Indiana Pacers
16
- What was the most blocks recorded by the Orlando Magic in a single home game in the 1999 season? SELECT MAX(blk_home) AS max_blocks FROM game WHERE team_abbreviation_home = 'ORL' AND season_id = '21999'; 10.0
17
- What was the average number of fastbreak points scored by the Houston Rockets in games they won by more than 15 points at home? SELECT AVG(o.pts_fb_home) AS avg_fastbreak_points FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Houston Rockets' AND g.wl_home = 'W' AND (g.pts_home - g.pts_away) > 15; 13.39790576
18
- How many times did the Los Angeles Clippers lose at home in the 2002 season despite recording more steals and blocks than their opponent? SELECT COUNT(*) FROM game g WHERE g.team_abbreviation_home = 'LAC' AND g.wl_home = 'L' AND g.stl_home > g.stl_away AND g.blk_home > g.blk_away AND g.season_id = '22002'; 4
19
- What is the full name of the team based in Dallas? SELECT full_name FROM team WHERE city = 'Dallas'; Dallas Mavericks
20
- Which team played the most total games (home + away) between 1995 and 2005? SELECT team FROM (SELECT team_abbreviation_home AS team FROM game WHERE season_id BETWEEN '21995' AND '22005' UNION ALL SELECT team_abbreviation_away FROM game WHERE season_id BETWEEN '21995' AND '22005') GROUP BY team ORDER BY COUNT(*) DESC LIMIT 1; WAS
21
- How many games did the Miami Heat lose away in the 1996 season? SELECT COUNT(*) as losses FROM game WHERE team_name_away = 'Miami Heat' AND wl_away = 'L' AND season_id = '21996'; 9.0
22
- What is the average number of tov in away games by the Miami Heat? SELECT AVG(tov_away) FROM game WHERE team_name_away = 'Miami Heat'; 15.235255570117957
23
- "What is the total second chance points by the Miami Heat at home?""" SELECT SUM(pts_2nd_chance_home) as total_2nd_chance FROM other_stats WHERE team_abbreviation_home = 'MIA'; 11670.0
24
- How many home games did the Orlando Magic play in the 2013 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Orlando Magic' AND season_id = '22013'; 41.0
25
- In which season did the Boston Celtics have the highest average tov at home? SELECT season_id, AVG(tov_home) as avg_stat FROM game WHERE team_name_home = 'Boston Celtics' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2005.0
26
- In which season did the Chicago Bulls have the highest average ft_pct at home? SELECT season_id, AVG(ft_pct_home) as avg_stat FROM game WHERE team_name_home = 'Chicago Bulls' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2016.0
27
- How many games did the Cleveland Cavaliers play at home with more than 8 times tied in 1996? SELECT COUNT(*) as games FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_home = 'Cleveland Cavaliers' AND os.times_tied > 8 AND g.season_id = '21996'; 5.0
28
- What was the average number of offensive rebounds per game for the Chicago Bulls in the 2019 season? SELECT AVG(oreb) AS avg_offensive_rebounds FROM ( SELECT game_id, oreb_home AS oreb FROM game WHERE team_name_home = 'Chicago Bulls' AND season_id = '22019' UNION ALL SELECT game_id, oreb_away AS oreb FROM game WHERE team_name_away = 'Chicago Bulls' AND season_id = '22019' ); 10.46153846
29
- What was the highest combined steals and blocks total for the Toronto Raptors in any home game during their championship season? SELECT MAX(stl_home + blk_home) AS combined_steals_blocks FROM game WHERE team_name_home = 'Toronto Raptors' AND season_id = '22019'; 24
30
- How many times have the Boston Celtics won an away game by at least 20 points? SELECT COUNT(*) FROM game WHERE team_abbreviation_away = 'BOS' AND wl_away = 'W' AND (pts_away - pts_home) >= 20; 179
31
- How many total turnovers did the Sacramento Kings commit in the 2001 season? SELECT SUM(tov) AS total_turnovers FROM ( SELECT tov_home AS tov FROM game WHERE team_abbreviation_home = 'SAC' AND season_id = '22001' UNION ALL SELECT tov_away AS tov FROM game WHERE team_abbreviation_away = 'SAC' AND season_id = '22001' ); 1128.0
32
- What is the largest margin of victory the Miami Heat have ever had in an away game? SELECT MAX(ABS(pts_away - pts_home)) AS largest_margin FROM game WHERE team_abbreviation_away = 'MIA' AND pts_away > pts_home; 34.0
33
- What was the average margin of victory for the Boston Celtics in home games during the 2000 season? SELECT AVG(pts_home - pts_away) AS avg_victory_margin FROM game WHERE team_name_home = 'Boston Celtics' AND wl_home = 'W' AND season_id = '22000'; 9.75
34
- What are the nicknames of teams based in Florida? SELECT nickname FROM team WHERE state = 'Florida'; Heat, Magic
35
- What was the highest total rebound count by an away team in a game? SELECT team_abbreviation_away, reb_away, game_date FROM game ORDER BY reb_away DESC LIMIT 1; BOS|90.0|1957-10-22 00:00:00
36
- What is the total number of rebounds by the San Antonio Spurs in home games during the 2015 season? SELECT SUM(reb_home) FROM game WHERE team_abbreviation_home = 'SAS' AND season_id = '22015'; 1845.0
37
- Which away team scored the most points off turnovers in a single game? SELECT team_abbreviation_away FROM other_stats ORDER BY pts_off_to_away DESC LIMIT 1; ATL
38
- What is the highest fast break points by the Houston Rockets at home? SELECT MAX(pts_fb_home) as max_fb_points FROM other_stats WHERE team_abbreviation_home = 'HOU'; 37.0
39
- What is the average number of tov in home games by the Miami Heat? SELECT AVG(tov_home) FROM game WHERE team_name_home = 'Miami Heat'; 14.627184466019418
40
- What is the total number of points scored by the Los Angeles Clippers in the 2014 season in games where they had more team turnovers but fewer total turnovers than their opponent? SELECT SUM(g.pts_home) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_home = 'LAC' AND o.team_turnovers_home > o.team_turnovers_away AND o.total_turnovers_home < o.total_turnovers_away AND g.season_id = '22014'; 295.0
41
- Which home team had the most games with a positive plus-minus but still lost? SELECT team_name_home FROM game WHERE wl_home = 'L' AND plus_minus_home > 0 GROUP BY team_name_home ORDER BY COUNT(*) DESC LIMIT 1; West NBA All Stars West
42
- In which season did the Miami Heat have the highest average ast at home? SELECT season_id, AVG(ast_home) as avg_stat FROM game WHERE team_name_home = 'Miami Heat' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2019.0
43
- How many games did the Chicago Bulls win at home in the 2010 season? SELECT COUNT(*) FROM game WHERE team_abbreviation_home = 'CHI' AND wl_home = 'W' AND season_id = '22010'; 36
44
- What was the average points scored by the Denver Nuggets in home games during the 2019 season? SELECT AVG(pts_home) AS avg_home_points FROM game WHERE team_name_home = 'Denver Nuggets' AND season_id = '22019'; 111.8378378
45
- When was the Los Angeles Clippers team founded according to the team database? SELECT year_founded FROM team WHERE full_name = 'Los Angeles Clippers'; 1970
46
- What is the average number of ast in home games by the Boston Celtics? SELECT AVG(ast_home) FROM game WHERE team_name_home = 'Boston Celtics'; 24.886892177589857
47
- What is the average number of ast in away games by the Los Angeles Lakers? SELECT AVG(ast_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 22.594638949671772
48
- What team had the most turnovers in a single game during the 2019 season? SELECT CASE WHEN tov_home > tov_away THEN team_name_home ELSE team_name_away END AS team_with_most_turnovers FROM game WHERE season_id = '22019' ORDER BY CASE WHEN tov_home > tov_away THEN tov_home ELSE tov_away END DESC LIMIT 1 Sacramento Kings
49
- What is the highest points scored by the Miami Heat at home when they had more than 10 second chance points? SELECT MAX(g.pts_home) as max_points FROM game g JOIN other_stats os ON g.game_id = os.game_id WHERE g.team_name_home = 'Miami Heat' AND os.pts_2nd_chance_home > 10; 149.0
50
- What is the total points in the paint by the Chicago Bulls at home in games they lost in 1996? SELECT SUM(os.pts_paint_home) as total_pts_paint FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_home = 'Chicago Bulls' AND g.wl_home = 'L' AND g.season_id = '21996'; 56.0
51
- How many games did the Oklahoma City Thunder score more than 30 points in the first quarter during the 2017 season? SELECT COUNT(*) AS high_scoring_first_quarters FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE (g.team_name_home = 'Oklahoma City Thunder' AND g.pts_home / 4 > 30) OR (g.team_name_away = 'Oklahoma City Thunder' AND g.pts_away / 4 > 30) AND g.season_id = '22017'; 83
52
- What is the total number of points scored by the Milwaukee Bucks away when they had more than 5 lead changes? SELECT SUM(g.pts_away) as total_points FROM game g JOIN other_stats os ON g.game_id = os.game_id WHERE g.team_name_away = 'Milwaukee Bucks' AND os.lead_changes > 5; 44835.0
53
- List all games where the Houston Rockets and Dallas Mavericks played each other in the 2015 season. SELECT * FROM game WHERE season_id = '22015' AND ((team_abbreviation_home = 'HOU' AND team_abbreviation_away = 'DAL') OR (team_abbreviation_home = 'DAL' AND team_abbreviation_away = 'HOU')); 22015|1610612745|HOU|Houston Rockets|0021500140|2015-11-14 00:00:00|HOU vs. DAL|L|240|32.0|84.0|0.381|9.0|34.0|0.265|25.0|32.0|0.781|12.0|31.0|43.0|22.0|9.0|5.0|14.0|23.0|98.0|-12|1|1610612742|DAL|Dallas Mavericks|DAL @ HOU|W|43.0|89.0|0.483|8.0|28.0|0.286|16.0|21.0|0.762|8.0|37.0|45.0|24.0|6.0|7.0|11.0|21.0|110.0|12|1|Regular Season 22015|1610612742|DAL|Dallas Mavericks|0021500287|2015-12-04 00:00:00|DAL vs. HOU|L|240|37.0|81.0|0.457|8.0|29.0|0.276|14.0|20.0|0.7|11.0|31.0|42.0|23.0|8.0|5.0|18.0|17.0|96.0|-4|1|1610612745|HOU|Houston Rockets|HOU @ DAL|W|39.0|84.0|0.464|12.0|26.0|0.462|10.0|18.0|0.556|15.0|30.0|45.0|20.0|12.0|5.0|18.0|22.0|100.0|4|1|Regular Season 22015|1610612745|HOU|Houston Rockets|0021500665|2016-01-24 00:00:00|HOU vs. DAL|W|240|43.0|89.0|0.483|15.0|44.0|0.341|14.0|21.0|0.667|9.0|31.0|40.0|27.0|9.0|7.0|9.0|21.0|115.0|11|1|1610612742|DAL|Dallas Mavericks|DAL @ HOU|L|36.0|79.0|0.456|15.0|30.0|0.5|17.0|22.0|0.773|8.0|28.0|36.0|17.0|4.0|4.0|16.0|20.0|104.0|-11|1|Regular Season 22015|1610612742|DAL|Dallas Mavericks|0021501170|2016-04-06 00:00:00|DAL vs. HOU|W|240|33.0|80.0|0.413|10.0|33.0|0.303|12.0|14.0|0.857|13.0|27.0|40.0|19.0|9.0|4.0|14.0|20.0|88.0|2|1|1610612745|HOU|Houston Rockets|HOU @ DAL|L|34.0|78.0|0.436|6.0|20.0|0.3|12.0|18.0|0.667|12.0|29.0|41.0|19.0|6.0|4.0|16.0|17.0|86.0|-2|1|Regular Season
54
- What is the highest combined reb in any game involving the San Antonio Spurs? SELECT MAX(reb_home + reb_away) FROM game WHERE team_name_home = 'San Antonio Spurs' OR team_name_away = 'San Antonio Spurs'; 134.0
55
- In which season did the Chicago Bulls have the highest average ast at home? SELECT season_id, AVG(ast_home) as avg_stat FROM game WHERE team_name_home = 'Chicago Bulls' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2021.0
56
- What is the lowest plus-minus score for the New York Knicks away? SELECT MIN(plus_minus_away) as min_plus_minus FROM game WHERE team_name_away = 'New York Knicks'; -47.0
57
- How many total points did the Chicago Bulls score across all games in the 1988 season? SELECT SUM(pts) AS total_points FROM ( SELECT pts_home AS pts FROM game WHERE team_abbreviation_home = 'CHI' AND season_id = '21988' UNION ALL SELECT pts_away AS pts FROM game WHERE team_abbreviation_away = 'CHI' AND season_id = '21988' ); 8726.0
58
- What is the total number of fast break points scored by the Memphis Grizzlies at home during the 2005 season? SELECT SUM(pts_fb_home) FROM other_stats WHERE game_id IN ( SELECT game_id FROM game WHERE team_name_home = 'Memphis Grizzlies' AND season_id = '22005' ); 368
59
- What was the average points difference in home games won by the Denver Nuggets? SELECT AVG(pts_home - pts_away) FROM game WHERE team_abbreviation_home = 'DEN' AND wl_home = 'W'; 11.96471532
60
- How many times did the Memphis Grizzlies lose at home in the 2008 season despite recording more steals and blocks than their opponent? SELECT COUNT(*) FROM game g WHERE g.team_abbreviation_home = 'MEM' AND g.wl_home = 'L' AND g.stl_home > g.stl_away AND g.blk_home > g.blk_away AND g.season_id = '22008'; 3
61
- In which season did the Boston Celtics have the highest average reb at home? SELECT season_id, AVG(reb_home) as avg_stat FROM game WHERE team_name_home = 'Boston Celtics' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 1958.0
62
- In the 2020 season, what was the average number of second chance points allowed by the New Orleans Pelicans in games they won by less than 5 points? SELECT AVG(o.pts_2nd_chance_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE ((g.team_abbreviation_home = 'NOP' AND g.wl_home = 'W' AND ABS(g.pts_home - g.pts_away) < 5) OR (g.team_abbreviation_away = 'NOP' AND g.wl_away = 'W' AND ABS(g.pts_home - g.pts_away) < 5)) AND g.season_id = '22020'; 16.6
63
- How many games did the Golden State Warriors lose away in 1996? SELECT COUNT(*) as away_losses FROM game WHERE team_name_away = 'Golden State Warriors' AND wl_away = 'L' AND season_id = '21996'; 29.0
64
- Which team was most often held under 60 points in a game? SELECT team FROM (SELECT team_abbreviation_home AS team, pts_home AS pts FROM game UNION ALL SELECT team_abbreviation_away, pts_away FROM game) WHERE pts < 60 GROUP BY team ORDER BY COUNT(*) DESC LIMIT 1; BOS
65
- What is the average number of three-pointers made by the Golden State Warriors at home in the 2018 season? SELECT AVG(fg3m_home) FROM game WHERE team_abbreviation_home = 'GSW' AND season_id = '22018'; 13.1951219512195
66
- What is the Los Angeles Lakers' largest lead in a home game during the 2016 season? SELECT MAX(plus_minus_home) FROM game WHERE team_abbreviation_home = 'LAL' AND season_id = '22016'; 27
67
- What is the average number of points in the paint allowed by the Philadelphia 76ers when playing at home in the 2020 season in games with more than 15 lead changes? SELECT AVG(o.pts_paint_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_home = 'PHI' AND g.season_id = '22020' AND o.lead_changes > 15; 50.0
68
- How many points did the home team score in the game with the most lead changes and the fewest total fouls? SELECT pts_home FROM game WHERE game_id = (SELECT game_id FROM other_stats JOIN game USING(game_id) ORDER BY lead_changes DESC, (pf_home + pf_away) ASC LIMIT 1); 122.0
69
- How many games did the Cleveland Cavaliers lose away with more than 10 fast break points in 1996? SELECT COUNT(*) as losses FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_away = 'Cleveland Cavaliers' AND g.wl_away = 'L' AND os.pts_fb_away > 10 AND g.season_id = '21996'; 4.0
70
- What is the highest combined ast in any game involving the Orlando Magic? SELECT MAX(ast_home + ast_away) FROM game WHERE team_name_home = 'Orlando Magic' OR team_name_away = 'Orlando Magic'; 74.0
71
- What is the average points in the paint by the Utah Jazz away when they won? SELECT AVG(os.pts_paint_away) as avg_pts_paint FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_away = 'Utah Jazz' AND g.wl_away = 'W'; 42.48
72
- How many games did the Los Angeles Lakers play away in 1996? SELECT COUNT(*) as away_games FROM game WHERE team_name_away = 'Los Angeles Lakers' AND season_id = '21996'; 41.0
73
- How many games had at least one team with 30+ assists? SELECT COUNT(*) FROM game WHERE ast_home >= 30 OR ast_away >= 30; 11305
74
- What is the highest three-point percentage the Phoenix Suns achieved in an away game? SELECT MAX(fg3_pct_away) FROM game WHERE team_abbreviation_away = 'PHX'; 1
75
- How many away games did the Miami Heat play in the 2021 season? SELECT COUNT(*) FROM game WHERE team_name_away = 'Miami Heat' AND season_id = '22021'; 41.0
76
- How many times did the Boston Celtics win at home during the 2015 season? SELECT COUNT(*) FROM game WHERE team_abbreviation_home = 'BOS' AND season_id = '22015' AND wl_home = 'W'; 28
77
- How many free throws did the Houston Rockets attempt in away games they won during the 2020 season? SELECT SUM(fta_away) FROM game WHERE team_name_away = 'Houston Rockets' AND wl_away = 'W' AND season_id = '22020'; 149.0
78
- Which away team has scored the most points against the Miami Heat in a single game? SELECT team_name_away, pts_away FROM game WHERE team_abbreviation_home = 'MIA' ORDER BY pts_away DESC LIMIT 1; Milwaukee Bucks|144.0
79
- How many points were scored in the earliest recorded game in the database? SELECT (pts_home + pts_away) FROM game ORDER BY game_date ASC LIMIT 1; 134.0
80
- What is the average number of tov in away games by the Los Angeles Lakers? SELECT AVG(tov_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 14.554896142433234
81
- What is the total number of rebounds by the Milwaukee Bucks at home? SELECT SUM(reb_home) as total_rebounds FROM game WHERE team_name_home = 'Milwaukee Bucks'; 76050.0
82
- What is the highest number of assists recorded by the Indiana Pacers in a single home game? SELECT MAX(ast_home) FROM game WHERE team_name_home = 'Indiana Pacers'; 44.0
83
- How many times did the Miami Heat score more than 120 points at home in the 2015 season? SELECT COUNT(*) FROM game WHERE team_abbreviation_home = 'MIA' AND season_id = '22015' AND pts_home > 120; 3
84
- What was the lowest number of combined turnovers in any game involving the San Antonio Spurs during the 2019 season? SELECT MIN(o.total_turnovers_home + o.total_turnovers_away) AS min_combined_turnovers FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE (g.team_name_home = 'San Antonio Spurs' OR g.team_name_away = 'San Antonio Spurs') AND g.season_id = '22019'; 13
85
- What was the average number of fastbreak points scored by the Los Angeles Lakers in home wins during the 2020 season? SELECT AVG(o.pts_fb_home) AS avg_fastbreak_points FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Los Angeles Lakers' AND g.wl_home = 'W' AND g.season_id = '22020'; 13.64705882
86
- What was the highest number of steals by the Detroit Pistons in a single game during the 2004 season? SELECT MAX(stl) AS max_steals FROM ( SELECT stl_home AS stl FROM game WHERE team_abbreviation_home = 'DET' AND season_id = '22004' UNION ALL SELECT stl_away AS stl FROM game WHERE team_abbreviation_away = 'DET' AND season_id = '22004' ); 13
87
- In 2018, which team has the most home wins and how many home wins did they have? SELECT team_abbreviation_home, COUNT(*) FROM game WHERE wl_home = 'W' AND season_id = '22018' GROUP BY team_abbreviation_home ORDER BY COUNT(*) DESC LIMIT 1; (DEN, 34)
88
- How many three-pointers did the Golden State Warriors attempt in total during the 2017 season? SELECT SUM(fg3a) AS total_three_attempts FROM ( SELECT fg3a_home AS fg3a FROM game WHERE team_abbreviation_home = 'GSW' AND season_id = '22017' UNION ALL SELECT fg3a_away AS fg3a FROM game WHERE team_abbreviation_away = 'GSW' AND season_id = '22017' ); 2369.0
89
- What is the highest number of three-pointers made in a single game by the Houston Rockets at home? SELECT MAX(fg3m_home) FROM game WHERE team_name_home = 'Houston Rockets'; 27.0
90
- How many games did the Boston Celtics win on the road during the 2018 season? SELECT COUNT(*) AS away_wins FROM game WHERE team_name_away = 'Boston Celtics' AND wl_away = 'W' AND season_id = '22018'; 21
91
- What is the most three-pointers the Brooklyn Nets have ever made in a home game? SELECT MAX(fg3m_home) FROM game WHERE team_name_home = 'Brooklyn Nets'; 22.0
92
- How many total offensive rebounds did the Houston Rockets have in away games during the 2018 season? SELECT SUM(oreb_away) FROM game WHERE team_name_away = 'Houston Rockets' AND season_id = '22018'; 419.0
93
- What is the average number of pts in away games by the Miami Heat? SELECT AVG(pts_away) FROM game WHERE team_name_away = 'Miami Heat'; 96.7824377457405
94
- What is the state of the team nicknamed 'Jazz'? SELECT state FROM team WHERE nickname = 'Jazz'; Utah
95
- How many points did the Phoenix Suns score in the highest scoring away game they played? SELECT MAX(pts_away) FROM game WHERE team_abbreviation_away = 'PHX'; 161.0
96
- In which season did the Charlotte Hornets have the highest average reb at home? SELECT season_id, AVG(reb_home) as avg_stat FROM game WHERE team_name_home = 'Charlotte Hornets' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2017.0
97
- Which team had the worst average point differential in the 2007 season? SELECT team_abbreviation, AVG(point_diff) AS avg_point_differential FROM ( SELECT team_abbreviation_home AS team_abbreviation, (pts_home - pts_away) AS point_diff FROM game WHERE season_id = '22007' UNION ALL SELECT team_abbreviation_away, (pts_away - pts_home) FROM game WHERE season_id = '22007' ) GROUP BY team_abbreviation ORDER BY avg_point_differential ASC LIMIT 1; SEA|-8.75609756097561
98
- In which season did the Milwaukee Bucks have the highest average fg_pct at home? SELECT season_id, AVG(fg_pct_home) as avg_stat FROM game WHERE team_name_home = 'Milwaukee Bucks' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 42017.0
99
- In games where the Brooklyn Nets scored more than 50 points in the paint at home, what was their assist-to-field goal made ratio? SELECT SUM(g.ast_home) * 1.0 / SUM(g.fgm_home) AS assist_to_fgm_ratio FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Brooklyn Nets' AND o.pts_paint_home > 50; 0.588761175
100
- How many away games did the Chicago Bulls play in the 2020 season? SELECT COUNT(*) FROM game WHERE team_name_away = 'Chicago Bulls' AND season_id = '22020'; 36.0
101
- What is the average scoring ouput for home teams. Round to 2 decimal places. SELECT ROUND(AVG(pts_home),2) AS avg_home_points FROM game WHERE season_type = 'Regular Season'; 104.76
102
- In which season did the Golden State Warriors have the highest average reb at home? SELECT season_id, AVG(reb_home) as avg_stat FROM game WHERE team_name_home = 'Golden State Warriors' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 1974.0
103
- Which team founded in the 70s has a nickname starting with 'C'? SELECT full_name FROM team WHERE year_founded BETWEEN 1970 AND 1979 AND nickname LIKE 'C%'; Cleveland Cavaliers, Los Angeles Clippers
104
- What is the highest combined ft_pct in any game involving the Los Angeles Lakers? SELECT MAX(ft_pct_home + ft_pct_away) FROM game WHERE team_name_home = 'Los Angeles Lakers' OR team_name_away = 'Los Angeles Lakers'; 1.957
105
- How many fastbreak points did the Los Angeles Clippers average in home games during the 2020 season? SELECT AVG(o.pts_fb_home) AS avg_fastbreak_points FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'LA Clippers' AND g.season_id = '22020'; 11.5
106
- What is the average number of three-pointers made by away teams in games where they had more turnovers than assists? SELECT AVG(fg3m_away) FROM game WHERE tov_away > ast_away; 4.511052937754508
107
- What was the difference in average free throw attempts between the Brooklyn Nets and their opponents in home games during the 2020 season? SELECT AVG(fta_home - fta_away) AS fta_diff FROM game WHERE team_name_home = 'Brooklyn Nets' AND season_id = '22020'; 1.083333333
108
- What is the total points scored by the Philadelphia Warriors away? SELECT SUM(pts_away) as total_points FROM game WHERE team_name_away = 'Philadelphia 76ers'; 251917.0
109
- When was the last time the New York Knicks won a home game? SELECT game_date FROM game WHERE team_abbreviation_home = 'NYK' AND wl_home = 'W' ORDER BY game_date DESC LIMIT 1; 2023-05-10 00:00:00
110
- What was the lowest-scoring game involving the Indiana Pacers in the 1994 season? SELECT MIN(total_points) AS lowest_scoring_game FROM ( SELECT (pts_home + pts_away) AS total_points FROM game WHERE season_id = '21994' AND (team_abbreviation_home = 'IND' OR team_abbreviation_away = 'IND') ); 155.0
111
- How many games did the Sacramento Kings lose at home in 1996? SELECT COUNT(*) as home_losses FROM game WHERE team_name_home = 'Sacramento Kings' AND wl_home = 'L' AND season_id = '21996'; 19.0
112
- What was the total score of the only game in which the home team made exactly 33 field goals? SELECT pts_home + pts_away FROM game WHERE fgm_home = 33 LIMIT 1; 144.0
113
- What was the difference in second-chance points between the Chicago Bulls and their opponents in their closest home game of the 2016 season? SELECT o.pts_2nd_chance_home - o.pts_2nd_chance_away AS second_chance_diff FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Chicago Bulls' AND g.season_id = '22016' ORDER BY ABS(g.pts_home - g.pts_away) ASC LIMIT 1; -5
114
- What is the highest plus-minus score for the Indiana Pacers at home? SELECT MAX(plus_minus_home) as max_plus_minus FROM game WHERE team_name_home = 'Indiana Pacers'; 65.0
115
- What is the total number of three-pointers made by the Golden State Warriors at home versus the Cleveland Cavaliers in all seasons combined? SELECT SUM(fg3m_home) AS total_threes FROM game WHERE team_name_home = 'Golden State Warriors' AND team_name_away = 'Cleveland Cavaliers'; 407
116
- How many points did the away team score in the only game where the home team had exactly 69 field goal attempts? SELECT pts_away FROM game WHERE fga_home = 69 LIMIT 1; 81.0
117
- What is the average number of ast in away games by the Milwaukee Bucks? SELECT AVG(ast_away) FROM game WHERE team_name_away = 'Milwaukee Bucks'; 22.16927374301676
118
- What is the total number of steals recorded by the Miami Heat in games against the Boston Celtics? SELECT SUM(CASE WHEN team_name_home = 'Miami Heat' THEN stl_home ELSE stl_away END) AS total_steals FROM game WHERE (team_name_home = 'Miami Heat' AND team_name_away = 'Boston Celtics') OR (team_name_home = 'Boston Celtics' AND team_name_away = 'Miami Heat'); 1253
119
- Which team had the most games where both teams scored over 110 points? SELECT team FROM (SELECT team_abbreviation_home AS team FROM game WHERE pts_home > 110 AND pts_away > 110 UNION ALL SELECT team_abbreviation_away FROM game WHERE pts_home > 110 AND pts_away > 110) GROUP BY team ORDER BY COUNT(*) DESC LIMIT 1; LAL
120
- What is the highest number of points the Los Angeles Lakers have scored in a single away game? SELECT MAX(pts_away) FROM game WHERE team_abbreviation_away = 'LAL'; 153.0
121
- What is the total second chance points by the Washington Wizards away? SELECT SUM(pts_2nd_chance_away) as total_2nd_chance FROM other_stats WHERE team_abbreviation_away = 'WAS'; 13226.0
122
- What is the average number of assists per game for the Golden State Warriors when they won during the 2018 season? SELECT AVG(assists) AS avg_assists FROM ( SELECT ast_home AS assists FROM game WHERE team_name_home = 'Golden State Warriors' AND wl_home = 'W' AND season_id = '22018' UNION ALL SELECT ast_away AS assists FROM game WHERE team_name_away = 'Golden State Warriors' AND wl_away = 'W' AND season_id = '22018' ) AS winning_games 31
123
- What was the total number of points in the game where both teams had the exact same number of personal fouls? SELECT pts_home + pts_away FROM game WHERE pf_home = pf_away ORDER BY game_date DESC LIMIT 1; 258.0
124
- How many games did the Boston Celtics win at home during the 2020 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Boston Celtics' AND wl_home = 'W' AND season_id = '22020'; 21
125
- Which team had the highest average free throw percentage at home in the 2016 season? SELECT team_name_home, AVG(ft_pct_home) AS avg_ft_percentage FROM game WHERE season_id = '22016' GROUP BY team_name_home ORDER BY avg_ft_percentage DESC LIMIT 1; Boston Celtics | 0.820975609756098
126
- In the 2001 season, what was the average number of second chance points scored by the opponents when the Atlanta Hawks played at home and lost? SELECT AVG(o.pts_2nd_chance_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_home = 'ATL' AND g.wl_home = 'L' AND g.season_id = '22001'; 13.333333333333334
127
- Which team had the highest average points from second chance opportunities in home games they won during the 2016 season? SELECT g.team_name_home, AVG(o.pts_2nd_chance_home) AS avg_second_chance_pts FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.wl_home = 'W' AND g.season_id = '22016' GROUP BY g.team_name_home ORDER BY avg_second_chance_pts DESC LIMIT 1; Los Angeles Lakers | 15.6153846153846
128
- What is the highest number of points the Golden State Warriors have ever scored in a single home game? SELECT MAX(pts_home) FROM game WHERE team_abbreviation_home = 'GSW'; 149.0
129
- What is the average number of ft_pct in home games by the Los Angeles Lakers? SELECT AVG(ft_pct_home) FROM game WHERE team_name_home = 'Los Angeles Lakers'; 0.7450706106870195
130
- How many team turnovers did the New York Knicks have at home? SELECT SUM(team_turnovers_home) as total_team_turnovers FROM other_stats WHERE team_abbreviation_home = 'NYK'; 550.0
131
- How many three-pointers did the Golden State Warriors make in total during the 2016 season? SELECT SUM(fg3m_home + fg3m_away) AS total_three_pointers FROM game WHERE season_id = '22016' AND (team_name_home = 'Golden State Warriors' OR team_name_away = 'Golden State Warriors'); 1719.0
132
- What is the total rebounds by the Miami Heat at home? SELECT SUM(reb_home) as total_rebounds FROM game WHERE team_name_home = 'Miami Heat'; 65199.0
133
- What is the average number of fg_pct in away games by the Los Angeles Lakers? SELECT AVG(fg_pct_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 0.4678996728462382
134
- How many points did the home team score in the game with the most second chance points? SELECT pts_home FROM game WHERE game_id = (SELECT game_id FROM other_stats ORDER BY (pts_2nd_chance_home + pts_2nd_chance_away) DESC LIMIT 1); 115.0
135
- What was the total number of points in the only game where the sum of both teams' free throws made was exactly 42? SELECT pts_home + pts_away FROM game WHERE (ftm_home + ftm_away) = 42 LIMIT 1; 156.0
136
- What is the average number of ft_pct in home games by the Charlotte Hornets? SELECT AVG(ft_pct_home) FROM game WHERE team_name_home = 'Charlotte Hornets'; 0.7601475237091683
137
- Which team is based in the city of Chicago? SELECT full_name FROM team WHERE city = 'Chicago'; Chicago Bulls
138
- What is the Chicago Bulls' largest lead in a home game during the 2016 season? SELECT MAX(plus_minus_home) FROM game WHERE team_abbreviation_home = 'CHI' AND season_id = '22016'; 47
139
- Which players scored 50 or more points in a game during the 1990s? SELECT game_id, game_date, CASE WHEN pts_home >= 50 THEN team_name_home ELSE team_name_away END AS team_name, CASE WHEN pts_home >= 50 THEN pts_home ELSE pts_away END AS points FROM game WHERE (pts_home >= 50 OR pts_away >= 50) AND CAST(SUBSTR(season_id, 2) AS INTEGER) BETWEEN 1990 AND 1999 ORDER BY points DESC
140
- How many home games did the Los Angeles Lakers play in the 2022 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Los Angeles Lakers' AND season_id = '22022'; 41.0
141
- What is the total points in the paint by the Milwaukee Bucks away? SELECT SUM(pts_paint_away) as total_pts_paint FROM other_stats WHERE team_abbreviation_away = 'MIL'; 39056.0
142
- What is the largest margin of victory in a game, whether home or away? SELECT game_date, ABS(pts_home - pts_away) AS margin FROM game ORDER BY margin DESC LIMIT 1; 2021-12-02 00:00:00|73.0
143
- What is the average number of pts in away games by the Portland Trail Blazers? SELECT AVG(pts_away) FROM game WHERE team_name_away = 'Portland Trail Blazers'; 102.6668215613383
144
- What is the highest number of rebounds recorded by a home team in a game during the 2005 season? SELECT MAX(reb_home) FROM game WHERE season_id = '22005'; 65.0
145
- What is the highest combined ast in any game involving the Boston Celtics? SELECT MAX(ast_home + ast_away) FROM game WHERE team_name_home = 'Boston Celtics' OR team_name_away = 'Boston Celtics'; 79.0
146
- How many times were games tied when the Indiana Pacers played away? SELECT SUM(times_tied) as total_times_tied FROM other_stats WHERE team_abbreviation_away = 'IND'; 4910.0
147
- How many points did the away team score when the home team had more than 20 offensive rebounds? SELECT SUM(pts_away) FROM game WHERE game_id IN (SELECT game_id FROM game WHERE oreb_home > 20); 199836.0
148
- What is the highest combined score in a game between the Golden State Warriors and the Cleveland Cavaliers? SELECT MAX(pts_home + pts_away) FROM game WHERE (team_name_home = 'Golden State Warriors' AND team_name_away = 'Cleveland Cavaliers') OR (team_name_home = 'Cleveland Cavaliers' AND team_name_away = 'Golden State Warriors'); 266.0
149
- Which game had the highest total points scored by both teams when the Los Angeles Lakers played at home? SELECT game_id, (pts_home + pts_away) AS total_points FROM game WHERE team_abbreviation_home = 'LAL' ORDER BY total_points DESC LIMIT 1; (0028000933, 294.0)
150
- How many games did the Sacramento Kings lose away with more than 15 fast break points in 1996? SELECT COUNT(*) as losses FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_away = 'Sacramento Kings' AND g.wl_away = 'L' AND os.pts_fb_away > 15 AND g.season_id = '21996'; 10.0
151
- What is the lowest number of points the Golden State Warriors have scored in an away game? SELECT MIN(pts_away) FROM game WHERE team_abbreviation_away = 'GSW'; 65.0
 
1
+ natural_query sql_query result is_nba
2
+ 0 What is the average number of fg_pct in home games by the Chicago Bulls? SELECT AVG(fg_pct_home) FROM game WHERE team_name_home = 'Chicago Bulls'; 0.4636694306246544 True
3
+ 1 How many lead changes occurred in games where the Denver Nuggets played away? SELECT SUM(lead_changes) as total_lead_changes FROM other_stats WHERE team_abbreviation_away = 'DEN'; 5828.0 True
4
+ 2 Which team had the most away games where they had more offensive than defensive rebounds? SELECT team_abbreviation_away FROM game WHERE oreb_away > dreb_away GROUP BY team_abbreviation_away ORDER BY COUNT(*) DESC LIMIT 1; ATL True
5
+ 3 What is the maximum number of team rebounds recorded by the Dallas Mavericks in away games where they committed more than 20 fouls? SELECT MAX(o.team_rebounds_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_away = 'DAL' AND g.pf_away > 20 AND g.season_id = '22021'; 16 True
6
+ 4 What was the average margin of victory for the Miami Heat during the 2013 NBA season? SELECT AVG(victory_margin) AS avg_victory_margin FROM ( SELECT plus_minus_home AS victory_margin FROM game WHERE team_name_home = 'Miami Heat' AND wl_home = 'W' AND season_id = '22013' UNION ALL SELECT plus_minus_away AS victory_margin FROM game WHERE team_name_away = 'Miami Heat' AND wl_away = 'W' AND season_id = '22013' ) AS victories 11.48148148 True
7
+ 5 What is the average fast break points scored by the Philadelphia 76ers at home during the 2018 season? SELECT AVG(os.pts_fb_home) AS avg_fast_break FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_abbreviation_home = 'PHI' AND g.season_id = '22018'; 16.32352941 True
8
+ 6 Which team has the nickname 'Celtics'? SELECT full_name FROM team WHERE nickname = 'Celtics'; Boston Celtics True
9
+ 7 How many games did the Milwaukee Bucks play at home during the 2020 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Milwaukee Bucks' AND season_id = '22020'; 36 True
10
+ 8 What is the average second-chance points for Toronto Raptors home games between 2015-2020? SELECT AVG(os.pts_2nd_chance_home) AS avg_second_chance FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_abbreviation_home = 'TOR' AND g.season_id BETWEEN '22015' AND '22020'; 13.07653061 True
11
+ 9 Which team had the most fast break points in a single home game during the 2020 season? SELECT team_name_home, MAX(pts_fb_home) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE game.season_id = '22020'; Houston Rockets|35 True
12
+ 10 What's the average points in the paint for the Boston Celtics in home games where they won by at least 10 points? SELECT AVG(os.pts_paint_home) FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_home = 'Boston Celtics' AND g.plus_minus_home >= 10; 41.85 True
13
+ 11 What is the highest combined total score (home + away) in a single game in the dataset? SELECT game_date, (pts_home + pts_away) AS total_points FROM game ORDER BY total_points DESC LIMIT 1; 2017-02-19 00:00:00|374.0 True
14
+ 12 Which team had the best three-point shooting percentage in home games during the 2020 season? SELECT team_name_home, AVG(fg3_pct_home) AS avg_3pt_pct FROM game WHERE season_id = '22020' GROUP BY team_name_home ORDER BY avg_3pt_pct DESC LIMIT 1; LA Clippers | 0.423777777777778 True
15
+ 13 Which team is located in the state of Indiana? SELECT full_name FROM team WHERE state = 'Indiana'; Indiana Pacers True
16
+ 14 What was the most blocks recorded by the Orlando Magic in a single home game in the 1999 season? SELECT MAX(blk_home) AS max_blocks FROM game WHERE team_abbreviation_home = 'ORL' AND season_id = '21999'; 10.0 True
17
+ 15 What was the average number of fastbreak points scored by the Houston Rockets in games they won by more than 15 points at home? SELECT AVG(o.pts_fb_home) AS avg_fastbreak_points FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Houston Rockets' AND g.wl_home = 'W' AND (g.pts_home - g.pts_away) > 15; 13.39790576 True
18
+ 16 How many times did the Los Angeles Clippers lose at home in the 2002 season despite recording more steals and blocks than their opponent? SELECT COUNT(*) FROM game g WHERE g.team_abbreviation_home = 'LAC' AND g.wl_home = 'L' AND g.stl_home > g.stl_away AND g.blk_home > g.blk_away AND g.season_id = '22002'; 4 True
19
+ 17 What is the full name of the team based in Dallas? SELECT full_name FROM team WHERE city = 'Dallas'; Dallas Mavericks True
20
+ 18 Which team played the most total games (home + away) between 1995 and 2005? SELECT team FROM (SELECT team_abbreviation_home AS team FROM game WHERE season_id BETWEEN '21995' AND '22005' UNION ALL SELECT team_abbreviation_away FROM game WHERE season_id BETWEEN '21995' AND '22005') GROUP BY team ORDER BY COUNT(*) DESC LIMIT 1; WAS True
21
+ 19 How many games did the Miami Heat lose away in the 1996 season? SELECT COUNT(*) as losses FROM game WHERE team_name_away = 'Miami Heat' AND wl_away = 'L' AND season_id = '21996'; 9.0 True
22
+ 20 What is the average number of tov in away games by the Miami Heat? SELECT AVG(tov_away) FROM game WHERE team_name_away = 'Miami Heat'; 15.235255570117957 True
23
+ 21 "What is the total second chance points by the Miami Heat at home?""" SELECT SUM(pts_2nd_chance_home) as total_2nd_chance FROM other_stats WHERE team_abbreviation_home = 'MIA'; 11670.0 True
24
+ 22 How many home games did the Orlando Magic play in the 2013 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Orlando Magic' AND season_id = '22013'; 41.0 True
25
+ 23 In which season did the Boston Celtics have the highest average tov at home? SELECT season_id, AVG(tov_home) as avg_stat FROM game WHERE team_name_home = 'Boston Celtics' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2005.0 True
26
+ 24 In which season did the Chicago Bulls have the highest average ft_pct at home? SELECT season_id, AVG(ft_pct_home) as avg_stat FROM game WHERE team_name_home = 'Chicago Bulls' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2016.0 True
27
+ 25 How many games did the Cleveland Cavaliers play at home with more than 8 times tied in 1996? SELECT COUNT(*) as games FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_home = 'Cleveland Cavaliers' AND os.times_tied > 8 AND g.season_id = '21996'; 5.0 True
28
+ 26 What was the average number of offensive rebounds per game for the Chicago Bulls in the 2019 season? SELECT AVG(oreb) AS avg_offensive_rebounds FROM ( SELECT game_id, oreb_home AS oreb FROM game WHERE team_name_home = 'Chicago Bulls' AND season_id = '22019' UNION ALL SELECT game_id, oreb_away AS oreb FROM game WHERE team_name_away = 'Chicago Bulls' AND season_id = '22019' ); 10.46153846 True
29
+ 27 What was the highest combined steals and blocks total for the Toronto Raptors in any home game during their championship season? SELECT MAX(stl_home + blk_home) AS combined_steals_blocks FROM game WHERE team_name_home = 'Toronto Raptors' AND season_id = '22019'; 24 True
30
+ 28 How many times have the Boston Celtics won an away game by at least 20 points? SELECT COUNT(*) FROM game WHERE team_abbreviation_away = 'BOS' AND wl_away = 'W' AND (pts_away - pts_home) >= 20; 179 True
31
+ 29 How many total turnovers did the Sacramento Kings commit in the 2001 season? SELECT SUM(tov) AS total_turnovers FROM ( SELECT tov_home AS tov FROM game WHERE team_abbreviation_home = 'SAC' AND season_id = '22001' UNION ALL SELECT tov_away AS tov FROM game WHERE team_abbreviation_away = 'SAC' AND season_id = '22001' ); 1128.0 True
32
+ 30 What is the largest margin of victory the Miami Heat have ever had in an away game? SELECT MAX(ABS(pts_away - pts_home)) AS largest_margin FROM game WHERE team_abbreviation_away = 'MIA' AND pts_away > pts_home; 34.0 True
33
+ 31 What was the average margin of victory for the Boston Celtics in home games during the 2000 season? SELECT AVG(pts_home - pts_away) AS avg_victory_margin FROM game WHERE team_name_home = 'Boston Celtics' AND wl_home = 'W' AND season_id = '22000'; 9.75 True
34
+ 32 What are the nicknames of teams based in Florida? SELECT nickname FROM team WHERE state = 'Florida'; Heat, Magic True
35
+ 33 What was the highest total rebound count by an away team in a game? SELECT team_abbreviation_away, reb_away, game_date FROM game ORDER BY reb_away DESC LIMIT 1; BOS|90.0|1957-10-22 00:00:00 True
36
+ 34 What is the total number of rebounds by the San Antonio Spurs in home games during the 2015 season? SELECT SUM(reb_home) FROM game WHERE team_abbreviation_home = 'SAS' AND season_id = '22015'; 1845.0 True
37
+ 35 Which away team scored the most points off turnovers in a single game? SELECT team_abbreviation_away FROM other_stats ORDER BY pts_off_to_away DESC LIMIT 1; ATL True
38
+ 36 What is the highest fast break points by the Houston Rockets at home? SELECT MAX(pts_fb_home) as max_fb_points FROM other_stats WHERE team_abbreviation_home = 'HOU'; 37.0 True
39
+ 37 What is the average number of tov in home games by the Miami Heat? SELECT AVG(tov_home) FROM game WHERE team_name_home = 'Miami Heat'; 14.627184466019418 True
40
+ 38 What is the total number of points scored by the Los Angeles Clippers in the 2014 season in games where they had more team turnovers but fewer total turnovers than their opponent? SELECT SUM(g.pts_home) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_home = 'LAC' AND o.team_turnovers_home > o.team_turnovers_away AND o.total_turnovers_home < o.total_turnovers_away AND g.season_id = '22014'; 295.0 True
41
+ 39 Which home team had the most games with a positive plus-minus but still lost? SELECT team_name_home FROM game WHERE wl_home = 'L' AND plus_minus_home > 0 GROUP BY team_name_home ORDER BY COUNT(*) DESC LIMIT 1; West NBA All Stars West True
42
+ 40 In which season did the Miami Heat have the highest average ast at home? SELECT season_id, AVG(ast_home) as avg_stat FROM game WHERE team_name_home = 'Miami Heat' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2019.0 True
43
+ 41 How many games did the Chicago Bulls win at home in the 2010 season? SELECT COUNT(*) FROM game WHERE team_abbreviation_home = 'CHI' AND wl_home = 'W' AND season_id = '22010'; 36 True
44
+ 42 What was the average points scored by the Denver Nuggets in home games during the 2019 season? SELECT AVG(pts_home) AS avg_home_points FROM game WHERE team_name_home = 'Denver Nuggets' AND season_id = '22019'; 111.8378378 True
45
+ 43 When was the Los Angeles Clippers team founded according to the team database? SELECT year_founded FROM team WHERE full_name = 'Los Angeles Clippers'; 1970 True
46
+ 44 What is the average number of ast in home games by the Boston Celtics? SELECT AVG(ast_home) FROM game WHERE team_name_home = 'Boston Celtics'; 24.886892177589857 True
47
+ 45 What is the average number of ast in away games by the Los Angeles Lakers? SELECT AVG(ast_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 22.594638949671772 True
48
+ 46 What team had the most turnovers in a single game during the 2019 season? SELECT CASE WHEN tov_home > tov_away THEN team_name_home ELSE team_name_away END AS team_with_most_turnovers FROM game WHERE season_id = '22019' ORDER BY CASE WHEN tov_home > tov_away THEN tov_home ELSE tov_away END DESC LIMIT 1 Sacramento Kings True
49
+ 47 What is the highest points scored by the Miami Heat at home when they had more than 10 second chance points? SELECT MAX(g.pts_home) as max_points FROM game g JOIN other_stats os ON g.game_id = os.game_id WHERE g.team_name_home = 'Miami Heat' AND os.pts_2nd_chance_home > 10; 149.0 True
50
+ 48 What is the total points in the paint by the Chicago Bulls at home in games they lost in 1996? SELECT SUM(os.pts_paint_home) as total_pts_paint FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_home = 'Chicago Bulls' AND g.wl_home = 'L' AND g.season_id = '21996'; 56.0 True
51
+ 49 How many games did the Oklahoma City Thunder score more than 30 points in the first quarter during the 2017 season? SELECT COUNT(*) AS high_scoring_first_quarters FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE (g.team_name_home = 'Oklahoma City Thunder' AND g.pts_home / 4 > 30) OR (g.team_name_away = 'Oklahoma City Thunder' AND g.pts_away / 4 > 30) AND g.season_id = '22017'; 83 True
52
+ 50 What is the total number of points scored by the Milwaukee Bucks away when they had more than 5 lead changes? SELECT SUM(g.pts_away) as total_points FROM game g JOIN other_stats os ON g.game_id = os.game_id WHERE g.team_name_away = 'Milwaukee Bucks' AND os.lead_changes > 5; 44835.0 True
53
+ 51 List all games where the Houston Rockets and Dallas Mavericks played each other in the 2015 season. SELECT * FROM game WHERE season_id = '22015' AND ((team_abbreviation_home = 'HOU' AND team_abbreviation_away = 'DAL') OR (team_abbreviation_home = 'DAL' AND team_abbreviation_away = 'HOU')); 22015|1610612745|HOU|Houston Rockets|0021500140|2015-11-14 00:00:00|HOU vs. DAL|L|240|32.0|84.0|0.381|9.0|34.0|0.265|25.0|32.0|0.781|12.0|31.0|43.0|22.0|9.0|5.0|14.0|23.0|98.0|-12|1|1610612742|DAL|Dallas Mavericks|DAL @ HOU|W|43.0|89.0|0.483|8.0|28.0|0.286|16.0|21.0|0.762|8.0|37.0|45.0|24.0|6.0|7.0|11.0|21.0|110.0|12|1|Regular Season 22015|1610612742|DAL|Dallas Mavericks|0021500287|2015-12-04 00:00:00|DAL vs. HOU|L|240|37.0|81.0|0.457|8.0|29.0|0.276|14.0|20.0|0.7|11.0|31.0|42.0|23.0|8.0|5.0|18.0|17.0|96.0|-4|1|1610612745|HOU|Houston Rockets|HOU @ DAL|W|39.0|84.0|0.464|12.0|26.0|0.462|10.0|18.0|0.556|15.0|30.0|45.0|20.0|12.0|5.0|18.0|22.0|100.0|4|1|Regular Season 22015|1610612745|HOU|Houston Rockets|0021500665|2016-01-24 00:00:00|HOU vs. DAL|W|240|43.0|89.0|0.483|15.0|44.0|0.341|14.0|21.0|0.667|9.0|31.0|40.0|27.0|9.0|7.0|9.0|21.0|115.0|11|1|1610612742|DAL|Dallas Mavericks|DAL @ HOU|L|36.0|79.0|0.456|15.0|30.0|0.5|17.0|22.0|0.773|8.0|28.0|36.0|17.0|4.0|4.0|16.0|20.0|104.0|-11|1|Regular Season 22015|1610612742|DAL|Dallas Mavericks|0021501170|2016-04-06 00:00:00|DAL vs. HOU|W|240|33.0|80.0|0.413|10.0|33.0|0.303|12.0|14.0|0.857|13.0|27.0|40.0|19.0|9.0|4.0|14.0|20.0|88.0|2|1|1610612745|HOU|Houston Rockets|HOU @ DAL|L|34.0|78.0|0.436|6.0|20.0|0.3|12.0|18.0|0.667|12.0|29.0|41.0|19.0|6.0|4.0|16.0|17.0|86.0|-2|1|Regular Season True
54
+ 52 What is the highest combined reb in any game involving the San Antonio Spurs? SELECT MAX(reb_home + reb_away) FROM game WHERE team_name_home = 'San Antonio Spurs' OR team_name_away = 'San Antonio Spurs'; 134.0 True
55
+ 53 In which season did the Chicago Bulls have the highest average ast at home? SELECT season_id, AVG(ast_home) as avg_stat FROM game WHERE team_name_home = 'Chicago Bulls' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2021.0 True
56
+ 54 What is the lowest plus-minus score for the New York Knicks away? SELECT MIN(plus_minus_away) as min_plus_minus FROM game WHERE team_name_away = 'New York Knicks'; -47.0 True
57
+ 55 How many total points did the Chicago Bulls score across all games in the 1988 season? SELECT SUM(pts) AS total_points FROM ( SELECT pts_home AS pts FROM game WHERE team_abbreviation_home = 'CHI' AND season_id = '21988' UNION ALL SELECT pts_away AS pts FROM game WHERE team_abbreviation_away = 'CHI' AND season_id = '21988' ); 8726.0 True
58
+ 56 What is the total number of fast break points scored by the Memphis Grizzlies at home during the 2005 season? SELECT SUM(pts_fb_home) FROM other_stats WHERE game_id IN ( SELECT game_id FROM game WHERE team_name_home = 'Memphis Grizzlies' AND season_id = '22005' ); 368 True
59
+ 57 What was the average points difference in home games won by the Denver Nuggets? SELECT AVG(pts_home - pts_away) FROM game WHERE team_abbreviation_home = 'DEN' AND wl_home = 'W'; 11.96471532 True
60
+ 58 How many times did the Memphis Grizzlies lose at home in the 2008 season despite recording more steals and blocks than their opponent? SELECT COUNT(*) FROM game g WHERE g.team_abbreviation_home = 'MEM' AND g.wl_home = 'L' AND g.stl_home > g.stl_away AND g.blk_home > g.blk_away AND g.season_id = '22008'; 3 True
61
+ 59 In which season did the Boston Celtics have the highest average reb at home? SELECT season_id, AVG(reb_home) as avg_stat FROM game WHERE team_name_home = 'Boston Celtics' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 1958.0 True
62
+ 60 In the 2020 season, what was the average number of second chance points allowed by the New Orleans Pelicans in games they won by less than 5 points? SELECT AVG(o.pts_2nd_chance_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE ((g.team_abbreviation_home = 'NOP' AND g.wl_home = 'W' AND ABS(g.pts_home - g.pts_away) < 5) OR (g.team_abbreviation_away = 'NOP' AND g.wl_away = 'W' AND ABS(g.pts_home - g.pts_away) < 5)) AND g.season_id = '22020'; 16.6 True
63
+ 61 How many games did the Golden State Warriors lose away in 1996? SELECT COUNT(*) as away_losses FROM game WHERE team_name_away = 'Golden State Warriors' AND wl_away = 'L' AND season_id = '21996'; 29.0 True
64
+ 62 Which team was most often held under 60 points in a game? SELECT team FROM (SELECT team_abbreviation_home AS team, pts_home AS pts FROM game UNION ALL SELECT team_abbreviation_away, pts_away FROM game) WHERE pts < 60 GROUP BY team ORDER BY COUNT(*) DESC LIMIT 1; BOS True
65
+ 63 What is the average number of three-pointers made by the Golden State Warriors at home in the 2018 season? SELECT AVG(fg3m_home) FROM game WHERE team_abbreviation_home = 'GSW' AND season_id = '22018'; 13.1951219512195 True
66
+ 64 What is the Los Angeles Lakers' largest lead in a home game during the 2016 season? SELECT MAX(plus_minus_home) FROM game WHERE team_abbreviation_home = 'LAL' AND season_id = '22016'; 27 True
67
+ 65 What is the average number of points in the paint allowed by the Philadelphia 76ers when playing at home in the 2020 season in games with more than 15 lead changes? SELECT AVG(o.pts_paint_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_home = 'PHI' AND g.season_id = '22020' AND o.lead_changes > 15; 50.0 True
68
+ 66 How many points did the home team score in the game with the most lead changes and the fewest total fouls? SELECT pts_home FROM game WHERE game_id = (SELECT game_id FROM other_stats JOIN game USING(game_id) ORDER BY lead_changes DESC, (pf_home + pf_away) ASC LIMIT 1); 122.0 True
69
+ 67 How many games did the Cleveland Cavaliers lose away with more than 10 fast break points in 1996? SELECT COUNT(*) as losses FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_away = 'Cleveland Cavaliers' AND g.wl_away = 'L' AND os.pts_fb_away > 10 AND g.season_id = '21996'; 4.0 True
70
+ 68 What is the highest combined ast in any game involving the Orlando Magic? SELECT MAX(ast_home + ast_away) FROM game WHERE team_name_home = 'Orlando Magic' OR team_name_away = 'Orlando Magic'; 74.0 True
71
+ 69 What is the average points in the paint by the Utah Jazz away when they won? SELECT AVG(os.pts_paint_away) as avg_pts_paint FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_away = 'Utah Jazz' AND g.wl_away = 'W'; 42.48 True
72
+ 70 How many games did the Los Angeles Lakers play away in 1996? SELECT COUNT(*) as away_games FROM game WHERE team_name_away = 'Los Angeles Lakers' AND season_id = '21996'; 41.0 True
73
+ 71 How many games had at least one team with 30+ assists? SELECT COUNT(*) FROM game WHERE ast_home >= 30 OR ast_away >= 30; 11305 True
74
+ 72 What is the highest three-point percentage the Phoenix Suns achieved in an away game? SELECT MAX(fg3_pct_away) FROM game WHERE team_abbreviation_away = 'PHX'; 1 True
75
+ 73 How many away games did the Miami Heat play in the 2021 season? SELECT COUNT(*) FROM game WHERE team_name_away = 'Miami Heat' AND season_id = '22021'; 41.0 True
76
+ 74 How many times did the Boston Celtics win at home during the 2015 season? SELECT COUNT(*) FROM game WHERE team_abbreviation_home = 'BOS' AND season_id = '22015' AND wl_home = 'W'; 28 True
77
+ 75 How many free throws did the Houston Rockets attempt in away games they won during the 2020 season? SELECT SUM(fta_away) FROM game WHERE team_name_away = 'Houston Rockets' AND wl_away = 'W' AND season_id = '22020'; 149.0 True
78
+ 76 Which away team has scored the most points against the Miami Heat in a single game? SELECT team_name_away, pts_away FROM game WHERE team_abbreviation_home = 'MIA' ORDER BY pts_away DESC LIMIT 1; Milwaukee Bucks|144.0 True
79
+ 77 How many points were scored in the earliest recorded game in the database? SELECT (pts_home + pts_away) FROM game ORDER BY game_date ASC LIMIT 1; 134.0 True
80
+ 78 What is the average number of tov in away games by the Los Angeles Lakers? SELECT AVG(tov_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 14.554896142433234 True
81
+ 79 What is the total number of rebounds by the Milwaukee Bucks at home? SELECT SUM(reb_home) as total_rebounds FROM game WHERE team_name_home = 'Milwaukee Bucks'; 76050.0 True
82
+ 80 What is the highest number of assists recorded by the Indiana Pacers in a single home game? SELECT MAX(ast_home) FROM game WHERE team_name_home = 'Indiana Pacers'; 44.0 True
83
+ 81 How many times did the Miami Heat score more than 120 points at home in the 2015 season? SELECT COUNT(*) FROM game WHERE team_abbreviation_home = 'MIA' AND season_id = '22015' AND pts_home > 120; 3 True
84
+ 82 What was the lowest number of combined turnovers in any game involving the San Antonio Spurs during the 2019 season? SELECT MIN(o.total_turnovers_home + o.total_turnovers_away) AS min_combined_turnovers FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE (g.team_name_home = 'San Antonio Spurs' OR g.team_name_away = 'San Antonio Spurs') AND g.season_id = '22019'; 13 True
85
+ 83 What was the average number of fastbreak points scored by the Los Angeles Lakers in home wins during the 2020 season? SELECT AVG(o.pts_fb_home) AS avg_fastbreak_points FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Los Angeles Lakers' AND g.wl_home = 'W' AND g.season_id = '22020'; 13.64705882 True
86
+ 84 What was the highest number of steals by the Detroit Pistons in a single game during the 2004 season? SELECT MAX(stl) AS max_steals FROM ( SELECT stl_home AS stl FROM game WHERE team_abbreviation_home = 'DET' AND season_id = '22004' UNION ALL SELECT stl_away AS stl FROM game WHERE team_abbreviation_away = 'DET' AND season_id = '22004' ); 13 True
87
+ 85 In 2018, which team has the most home wins and how many home wins did they have? SELECT team_abbreviation_home, COUNT(*) FROM game WHERE wl_home = 'W' AND season_id = '22018' GROUP BY team_abbreviation_home ORDER BY COUNT(*) DESC LIMIT 1; (DEN, 34) True
88
+ 86 How many three-pointers did the Golden State Warriors attempt in total during the 2017 season? SELECT SUM(fg3a) AS total_three_attempts FROM ( SELECT fg3a_home AS fg3a FROM game WHERE team_abbreviation_home = 'GSW' AND season_id = '22017' UNION ALL SELECT fg3a_away AS fg3a FROM game WHERE team_abbreviation_away = 'GSW' AND season_id = '22017' ); 2369.0 True
89
+ 87 What is the highest number of three-pointers made in a single game by the Houston Rockets at home? SELECT MAX(fg3m_home) FROM game WHERE team_name_home = 'Houston Rockets'; 27.0 True
90
+ 88 How many games did the Boston Celtics win on the road during the 2018 season? SELECT COUNT(*) AS away_wins FROM game WHERE team_name_away = 'Boston Celtics' AND wl_away = 'W' AND season_id = '22018'; 21 True
91
+ 89 What is the most three-pointers the Brooklyn Nets have ever made in a home game? SELECT MAX(fg3m_home) FROM game WHERE team_name_home = 'Brooklyn Nets'; 22.0 True
92
+ 90 How many total offensive rebounds did the Houston Rockets have in away games during the 2018 season? SELECT SUM(oreb_away) FROM game WHERE team_name_away = 'Houston Rockets' AND season_id = '22018'; 419.0 True
93
+ 91 What is the average number of pts in away games by the Miami Heat? SELECT AVG(pts_away) FROM game WHERE team_name_away = 'Miami Heat'; 96.7824377457405 True
94
+ 92 What is the state of the team nicknamed 'Jazz'? SELECT state FROM team WHERE nickname = 'Jazz'; Utah True
95
+ 93 How many points did the Phoenix Suns score in the highest scoring away game they played? SELECT MAX(pts_away) FROM game WHERE team_abbreviation_away = 'PHX'; 161.0 True
96
+ 94 In which season did the Charlotte Hornets have the highest average reb at home? SELECT season_id, AVG(reb_home) as avg_stat FROM game WHERE team_name_home = 'Charlotte Hornets' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2017.0 True
97
+ 95 Which team had the worst average point differential in the 2007 season? SELECT team_abbreviation, AVG(point_diff) AS avg_point_differential FROM ( SELECT team_abbreviation_home AS team_abbreviation, (pts_home - pts_away) AS point_diff FROM game WHERE season_id = '22007' UNION ALL SELECT team_abbreviation_away, (pts_away - pts_home) FROM game WHERE season_id = '22007' ) GROUP BY team_abbreviation ORDER BY avg_point_differential ASC LIMIT 1; SEA|-8.75609756097561 True
98
+ 96 In which season did the Milwaukee Bucks have the highest average fg_pct at home? SELECT season_id, AVG(fg_pct_home) as avg_stat FROM game WHERE team_name_home = 'Milwaukee Bucks' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 42017.0 True
99
+ 97 In games where the Brooklyn Nets scored more than 50 points in the paint at home, what was their assist-to-field goal made ratio? SELECT SUM(g.ast_home) * 1.0 / SUM(g.fgm_home) AS assist_to_fgm_ratio FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Brooklyn Nets' AND o.pts_paint_home > 50; 0.588761175 True
100
+ 98 How many away games did the Chicago Bulls play in the 2020 season? SELECT COUNT(*) FROM game WHERE team_name_away = 'Chicago Bulls' AND season_id = '22020'; 36.0 True
101
+ 99 What is the average scoring ouput for home teams. Round to 2 decimal places. SELECT ROUND(AVG(pts_home),2) AS avg_home_points FROM game WHERE season_type = 'Regular Season'; 104.76 True
102
+ 100 In which season did the Golden State Warriors have the highest average reb at home? SELECT season_id, AVG(reb_home) as avg_stat FROM game WHERE team_name_home = 'Golden State Warriors' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 1974.0 True
103
+ 101 Which team founded in the 70s has a nickname starting with 'C'? SELECT full_name FROM team WHERE year_founded BETWEEN 1970 AND 1979 AND nickname LIKE 'C%'; Cleveland Cavaliers, Los Angeles Clippers True
104
+ 102 What is the highest combined ft_pct in any game involving the Los Angeles Lakers? SELECT MAX(ft_pct_home + ft_pct_away) FROM game WHERE team_name_home = 'Los Angeles Lakers' OR team_name_away = 'Los Angeles Lakers'; 1.957 True
105
+ 103 How many fastbreak points did the Los Angeles Clippers average in home games during the 2020 season? SELECT AVG(o.pts_fb_home) AS avg_fastbreak_points FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'LA Clippers' AND g.season_id = '22020'; 11.5 True
106
+ 104 What is the average number of three-pointers made by away teams in games where they had more turnovers than assists? SELECT AVG(fg3m_away) FROM game WHERE tov_away > ast_away; 4.511052937754508 True
107
+ 105 What was the difference in average free throw attempts between the Brooklyn Nets and their opponents in home games during the 2020 season? SELECT AVG(fta_home - fta_away) AS fta_diff FROM game WHERE team_name_home = 'Brooklyn Nets' AND season_id = '22020'; 1.083333333 True
108
+ 106 What is the total points scored by the Philadelphia Warriors away? SELECT SUM(pts_away) as total_points FROM game WHERE team_name_away = 'Philadelphia 76ers'; 251917.0 True
109
+ 107 When was the last time the New York Knicks won a home game? SELECT game_date FROM game WHERE team_abbreviation_home = 'NYK' AND wl_home = 'W' ORDER BY game_date DESC LIMIT 1; 2023-05-10 00:00:00 True
110
+ 108 What was the lowest-scoring game involving the Indiana Pacers in the 1994 season? SELECT MIN(total_points) AS lowest_scoring_game FROM ( SELECT (pts_home + pts_away) AS total_points FROM game WHERE season_id = '21994' AND (team_abbreviation_home = 'IND' OR team_abbreviation_away = 'IND') ); 155.0 True
111
+ 109 How many games did the Sacramento Kings lose at home in 1996? SELECT COUNT(*) as home_losses FROM game WHERE team_name_home = 'Sacramento Kings' AND wl_home = 'L' AND season_id = '21996'; 19.0 True
112
+ 110 What was the total score of the only game in which the home team made exactly 33 field goals? SELECT pts_home + pts_away FROM game WHERE fgm_home = 33 LIMIT 1; 144.0 True
113
+ 111 What was the difference in second-chance points between the Chicago Bulls and their opponents in their closest home game of the 2016 season? SELECT o.pts_2nd_chance_home - o.pts_2nd_chance_away AS second_chance_diff FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Chicago Bulls' AND g.season_id = '22016' ORDER BY ABS(g.pts_home - g.pts_away) ASC LIMIT 1; -5 True
114
+ 112 What is the highest plus-minus score for the Indiana Pacers at home? SELECT MAX(plus_minus_home) as max_plus_minus FROM game WHERE team_name_home = 'Indiana Pacers'; 65.0 True
115
+ 113 What is the total number of three-pointers made by the Golden State Warriors at home versus the Cleveland Cavaliers in all seasons combined? SELECT SUM(fg3m_home) AS total_threes FROM game WHERE team_name_home = 'Golden State Warriors' AND team_name_away = 'Cleveland Cavaliers'; 407 True
116
+ 114 How many points did the away team score in the only game where the home team had exactly 69 field goal attempts? SELECT pts_away FROM game WHERE fga_home = 69 LIMIT 1; 81.0 True
117
+ 115 What is the average number of ast in away games by the Milwaukee Bucks? SELECT AVG(ast_away) FROM game WHERE team_name_away = 'Milwaukee Bucks'; 22.16927374301676 True
118
+ 116 What is the total number of steals recorded by the Miami Heat in games against the Boston Celtics? SELECT SUM(CASE WHEN team_name_home = 'Miami Heat' THEN stl_home ELSE stl_away END) AS total_steals FROM game WHERE (team_name_home = 'Miami Heat' AND team_name_away = 'Boston Celtics') OR (team_name_home = 'Boston Celtics' AND team_name_away = 'Miami Heat'); 1253 True
119
+ 117 Which team had the most games where both teams scored over 110 points? SELECT team FROM (SELECT team_abbreviation_home AS team FROM game WHERE pts_home > 110 AND pts_away > 110 UNION ALL SELECT team_abbreviation_away FROM game WHERE pts_home > 110 AND pts_away > 110) GROUP BY team ORDER BY COUNT(*) DESC LIMIT 1; LAL True
120
+ 118 What is the highest number of points the Los Angeles Lakers have scored in a single away game? SELECT MAX(pts_away) FROM game WHERE team_abbreviation_away = 'LAL'; 153.0 True
121
+ 119 What is the total second chance points by the Washington Wizards away? SELECT SUM(pts_2nd_chance_away) as total_2nd_chance FROM other_stats WHERE team_abbreviation_away = 'WAS'; 13226.0 True
122
+ 120 What is the average number of assists per game for the Golden State Warriors when they won during the 2018 season? SELECT AVG(assists) AS avg_assists FROM ( SELECT ast_home AS assists FROM game WHERE team_name_home = 'Golden State Warriors' AND wl_home = 'W' AND season_id = '22018' UNION ALL SELECT ast_away AS assists FROM game WHERE team_name_away = 'Golden State Warriors' AND wl_away = 'W' AND season_id = '22018' ) AS winning_games 31 True
123
+ 121 What was the total number of points in the game where both teams had the exact same number of personal fouls? SELECT pts_home + pts_away FROM game WHERE pf_home = pf_away ORDER BY game_date DESC LIMIT 1; 258.0 True
124
+ 122 How many games did the Boston Celtics win at home during the 2020 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Boston Celtics' AND wl_home = 'W' AND season_id = '22020'; 21 True
125
+ 123 Which team had the highest average free throw percentage at home in the 2016 season? SELECT team_name_home, AVG(ft_pct_home) AS avg_ft_percentage FROM game WHERE season_id = '22016' GROUP BY team_name_home ORDER BY avg_ft_percentage DESC LIMIT 1; Boston Celtics | 0.820975609756098 True
126
+ 124 In the 2001 season, what was the average number of second chance points scored by the opponents when the Atlanta Hawks played at home and lost? SELECT AVG(o.pts_2nd_chance_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_home = 'ATL' AND g.wl_home = 'L' AND g.season_id = '22001'; 13.333333333333334 True
127
+ 125 Which team had the highest average points from second chance opportunities in home games they won during the 2016 season? SELECT g.team_name_home, AVG(o.pts_2nd_chance_home) AS avg_second_chance_pts FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.wl_home = 'W' AND g.season_id = '22016' GROUP BY g.team_name_home ORDER BY avg_second_chance_pts DESC LIMIT 1; Los Angeles Lakers | 15.6153846153846 True
128
+ 126 What is the highest number of points the Golden State Warriors have ever scored in a single home game? SELECT MAX(pts_home) FROM game WHERE team_abbreviation_home = 'GSW'; 149.0 True
129
+ 127 What is the average number of ft_pct in home games by the Los Angeles Lakers? SELECT AVG(ft_pct_home) FROM game WHERE team_name_home = 'Los Angeles Lakers'; 0.7450706106870195 True
130
+ 128 How many team turnovers did the New York Knicks have at home? SELECT SUM(team_turnovers_home) as total_team_turnovers FROM other_stats WHERE team_abbreviation_home = 'NYK'; 550.0 True
131
+ 129 How many three-pointers did the Golden State Warriors make in total during the 2016 season? SELECT SUM(fg3m_home + fg3m_away) AS total_three_pointers FROM game WHERE season_id = '22016' AND (team_name_home = 'Golden State Warriors' OR team_name_away = 'Golden State Warriors'); 1719.0 True
132
+ 130 What is the total rebounds by the Miami Heat at home? SELECT SUM(reb_home) as total_rebounds FROM game WHERE team_name_home = 'Miami Heat'; 65199.0 True
133
+ 131 What is the average number of fg_pct in away games by the Los Angeles Lakers? SELECT AVG(fg_pct_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 0.4678996728462382 True
134
+ 132 How many points did the home team score in the game with the most second chance points? SELECT pts_home FROM game WHERE game_id = (SELECT game_id FROM other_stats ORDER BY (pts_2nd_chance_home + pts_2nd_chance_away) DESC LIMIT 1); 115.0 True
135
+ 133 What was the total number of points in the only game where the sum of both teams' free throws made was exactly 42? SELECT pts_home + pts_away FROM game WHERE (ftm_home + ftm_away) = 42 LIMIT 1; 156.0 True
136
+ 134 What is the average number of ft_pct in home games by the Charlotte Hornets? SELECT AVG(ft_pct_home) FROM game WHERE team_name_home = 'Charlotte Hornets'; 0.7601475237091683 True
137
+ 135 Which team is based in the city of Chicago? SELECT full_name FROM team WHERE city = 'Chicago'; Chicago Bulls True
138
+ 136 What is the Chicago Bulls' largest lead in a home game during the 2016 season? SELECT MAX(plus_minus_home) FROM game WHERE team_abbreviation_home = 'CHI' AND season_id = '22016'; 47 True
139
+ 137 Which players scored 50 or more points in a game during the 1990s? SELECT game_id, game_date, CASE WHEN pts_home >= 50 THEN team_name_home ELSE team_name_away END AS team_name, CASE WHEN pts_home >= 50 THEN pts_home ELSE pts_away END AS points FROM game WHERE (pts_home >= 50 OR pts_away >= 50) AND CAST(SUBSTR(season_id, 2) AS INTEGER) BETWEEN 1990 AND 1999 ORDER BY points DESC True
140
+ 138 How many home games did the Los Angeles Lakers play in the 2022 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Los Angeles Lakers' AND season_id = '22022'; 41.0 True
141
+ 139 What is the total points in the paint by the Milwaukee Bucks away? SELECT SUM(pts_paint_away) as total_pts_paint FROM other_stats WHERE team_abbreviation_away = 'MIL'; 39056.0 True
142
+ 140 What is the largest margin of victory in a game, whether home or away? SELECT game_date, ABS(pts_home - pts_away) AS margin FROM game ORDER BY margin DESC LIMIT 1; 2021-12-02 00:00:00|73.0 True
143
+ 141 What is the average number of pts in away games by the Portland Trail Blazers? SELECT AVG(pts_away) FROM game WHERE team_name_away = 'Portland Trail Blazers'; 102.6668215613383 True
144
+ 142 What is the highest number of rebounds recorded by a home team in a game during the 2005 season? SELECT MAX(reb_home) FROM game WHERE season_id = '22005'; 65.0 True
145
+ 143 What is the highest combined ast in any game involving the Boston Celtics? SELECT MAX(ast_home + ast_away) FROM game WHERE team_name_home = 'Boston Celtics' OR team_name_away = 'Boston Celtics'; 79.0 True
146
+ 144 How many times were games tied when the Indiana Pacers played away? SELECT SUM(times_tied) as total_times_tied FROM other_stats WHERE team_abbreviation_away = 'IND'; 4910.0 True
147
+ 145 How many points did the away team score when the home team had more than 20 offensive rebounds? SELECT SUM(pts_away) FROM game WHERE game_id IN (SELECT game_id FROM game WHERE oreb_home > 20); 199836.0 True
148
+ 146 What is the highest combined score in a game between the Golden State Warriors and the Cleveland Cavaliers? SELECT MAX(pts_home + pts_away) FROM game WHERE (team_name_home = 'Golden State Warriors' AND team_name_away = 'Cleveland Cavaliers') OR (team_name_home = 'Cleveland Cavaliers' AND team_name_away = 'Golden State Warriors'); 266.0 True
149
+ 147 Which game had the highest total points scored by both teams when the Los Angeles Lakers played at home? SELECT game_id, (pts_home + pts_away) AS total_points FROM game WHERE team_abbreviation_home = 'LAL' ORDER BY total_points DESC LIMIT 1; (0028000933, 294.0) True
150
+ 148 How many games did the Sacramento Kings lose away with more than 15 fast break points in 1996? SELECT COUNT(*) as losses FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_away = 'Sacramento Kings' AND g.wl_away = 'L' AND os.pts_fb_away > 15 AND g.season_id = '21996'; 10.0 True
151
+ 149 What is the lowest number of points the Golden State Warriors have scored in an away game? SELECT MIN(pts_away) FROM game WHERE team_abbreviation_away = 'GSW'; 65.0 True
utils/processing/update_test_set.ipynb ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "9d803a94",
6
+ "metadata": {},
7
+ "source": [
8
+ "# Update test dataset to include is_nba column"
9
+ ]
10
+ },
11
+ {
12
+ "cell_type": "code",
13
+ "execution_count": 1,
14
+ "id": "f6e5e97d",
15
+ "metadata": {},
16
+ "outputs": [],
17
+ "source": [
18
+ "import pandas as pd\n",
19
+ "import re\n",
20
+ "\n",
21
+ "test_df = pd.read_csv(\"../../training-data/test_set.tsv\", sep='\\t')\n",
22
+ "\n",
23
+ "test_df[\"is_nba\"] = True\n",
24
+ "\n",
25
+ "test_df.to_csv(\"../../training-data/test_set.tsv\", sep='\\t')\n"
26
+ ]
27
+ }
28
+ ],
29
+ "metadata": {
30
+ "kernelspec": {
31
+ "display_name": "Python 3",
32
+ "language": "python",
33
+ "name": "python3"
34
+ },
35
+ "language_info": {
36
+ "codemirror_mode": {
37
+ "name": "ipython",
38
+ "version": 3
39
+ },
40
+ "file_extension": ".py",
41
+ "mimetype": "text/x-python",
42
+ "name": "python",
43
+ "nbconvert_exporter": "python",
44
+ "pygments_lexer": "ipython3",
45
+ "version": "3.12.6"
46
+ }
47
+ },
48
+ "nbformat": 4,
49
+ "nbformat_minor": 5
50
+ }
utils/prompts/tennis_prompt.py ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ input_text = """You are an AI assistant that converts natural language queries into valid SQLite queries.
2
+ Database Schema and Explanations
3
+
4
+ matches Table
5
+ Stores information about all Tennis matches.
6
+ CREATE TABLE IF NOT EXISTS "matches" (
7
+ "tourney_id" TEXT, -- Unique tournament identifier (string form)
8
+ "tourney_name" TEXT, -- Name of the tournament (e.g., "Wimbledon")
9
+ "surface" TEXT, -- Court surface ("Hard", "Clay", "Grass")
10
+ "draw_size" TEXT, -- Number of players in the tournament draw
11
+ "tourney_level" TEXT, -- Tournament category (e.g., "G", "M", "A")
12
+ "tourney_date" REAL, -- Start date of the tournament (YYYYMMDD as real)
13
+ "match_num" TEXT, -- Internal match index within a tournament
14
+ "winner_id" REAL, -- Unique ID of the singles match winner
15
+ "winner_seed" TEXT, -- Seed number of the match winner (if any)
16
+ "winner_entry" TEXT, -- Type of entry ("WC", "Q", "LL", etc.)
17
+ "winner_name" TEXT, -- Name of the match winner
18
+ "winner_hand" TEXT, -- Winner's playing hand ("R" or "L")
19
+ "winner_ht" REAL, -- Winner's height in centimeters
20
+ "winner_ioc" TEXT, -- Winner's country code (International Olympic Committee format)
21
+ "winner_age" REAL, -- Winner's age at time of match
22
+ "loser_id" REAL, -- Unique ID of the singles match loser
23
+ "loser_seed" TEXT, -- Seed number of the match loser
24
+ "loser_entry" TEXT, -- Type of entry for the loser
25
+ "loser_name" TEXT, -- Loser's full name
26
+ "loser_hand" TEXT, -- Loser's playing hand
27
+ "loser_ht" REAL, -- Loser's height
28
+ "loser_ioc" TEXT, -- Loser's country code
29
+ "loser_age" REAL, -- Loser's age
30
+ "score" TEXT, -- Final match score in tennis notation
31
+ "best_of" TEXT, -- Number of sets the match is played to (usually 3 or 5)
32
+ "round" TEXT, -- Tournament round ("R64", "QF", "SF", "F")
33
+ "minutes" REAL, -- Match duration in minutes
34
+ "w_ace" REAL, -- Aces hit by the winner
35
+ "w_df" REAL, -- Double faults made by the winner
36
+ "w_svpt" REAL, -- Total serve points played by the winner
37
+ "w_1stIn" REAL, -- First serves made by the winner
38
+ "w_1stWon" REAL, -- First-serve points won by the winner
39
+ "w_2ndWon" REAL, -- Second-serve points won by the winner
40
+ "w_SvGms" REAL, -- Serve games played by the winner
41
+ "w_bpSaved" REAL, -- Break points saved by the winner
42
+ "w_bpFaced" REAL, -- Break points faced by the winner
43
+ "l_ace" REAL, -- Aces by the loser
44
+ "l_df" REAL, -- Double faults by the loser
45
+ "l_svpt" REAL, -- Serve points played by the loser
46
+ "l_1stIn" REAL, -- First serves made by the loser
47
+ "l_1stWon" REAL, -- First-serve points won by the loser
48
+ "l_2ndWon" REAL, -- Second-serve points won by the loser
49
+ "l_SvGms" REAL, -- Serve games played by the loser
50
+ "l_bpSaved" REAL, -- Break points saved by the loser
51
+ "l_bpFaced" REAL, -- Break points faced by the loser
52
+ "winner_rank" REAL, -- Winner's ATP ranking at the time of match
53
+ "winner_rank_points" REAL, -- Winner's ATP ranking points
54
+ "loser_rank" REAL, -- Loser's ATP ranking
55
+ "loser_rank_points" REAL, -- Loser's ATP points
56
+ "winner1_id" REAL, -- Player IDs for the winning doubles team
57
+ "winner2_id" TEXT, -- Player IDs for the winning doubles team
58
+ "loser1_id" TEXT, -- Player IDs for the losing doubles team
59
+ "loser2_id" REAL, -- Player IDs for the losing doubles team
60
+ "winner1_name" TEXT, -- Name of winning doubles player #1
61
+ "winner1_hand" REAL, -- Playing hand for winning doubles players #1
62
+ "winner1_ht" TEXT, -- Height of winning doubles player #1
63
+ "winner1_ioc" REAL, -- Nationality of winning doubles player #1
64
+ "winner1_age" TEXT, -- Age of winning doubles player #1
65
+ "winner2_name" TEXT, -- Name of winning doubles player #2
66
+ "winner2_hand" REAL, -- Playing hand for winning doubles player #2
67
+ "winner2_ht" TEXT, -- Height of winning doubles player #2
68
+ "winner2_ioc" REAL, -- Nationality of winning doubles player #2
69
+ "winner2_age" TEXT, -- Age of winning doubles player #2
70
+ "loser1_name" TEXT, -- Name of losing doubles player #1
71
+ "loser1_hand" REAL, -- Playing hand for losing doubles players #1
72
+ "loser1_ht" TEXT, -- Height of losing doubles player #1
73
+ "loser1_ioc" REAL, -- Nationality of losing doubles player #1
74
+ "loser1_age" TEXT, -- Age of losing doubles player #1
75
+ "loser2_name" TEXT, -- Name of losing doubles player #2
76
+ "loser2_hand" REAL, -- Playing hand for losing doubles player #2
77
+ "loser2_ht" TEXT, -- Height of losing doubles player #2
78
+ "loser2_ioc" REAL, -- Nationality of losing doubles player #2
79
+ "loser2_age" REAL, -- Age of losing doubles player #2
80
+ "winner1_rank" REAL, -- Doubles #1 winner ranking
81
+ "winner1_rank_points" REAL, -- Doubles #1 winner rank points
82
+ "winner2_rank" REAL, -- Doubles #2 winner ranking
83
+ "winner2_rank_points" REAL, -- Doubles #2 winner rank points
84
+ "loser1_rank" REAL, -- Doubles #1 loser ranking
85
+ "loser1_rank_points" REAL, -- Doubles #1 loser rank points
86
+ "loser2_rank" REAL, -- Doubles #2 loser ranking
87
+ "loser2_rank_points" REAL -- Doubles #2 loser rank points
88
+ );
89
+
90
+ players Table
91
+ Stores information about all tennis players.
92
+ CREATE TABLE IF NOT EXISTS "players" (
93
+ "player_id" INTEGER, -- Unique player identifier (primary key)
94
+ "hand" TEXT, -- Playing hand ("R", "L")
95
+ "dob" REAL, -- Date of birth (YYYYMMDD)
96
+ "ioc" TEXT, -- Country code (eg. USA for United States of America)
97
+ "height" REAL, -- Height in centimeters
98
+ name TEXT -- Player's full name
99
+ );
100
+
101
+ rankings Table
102
+ Contains information about player rankings over different dates
103
+ CREATE TABLE IF NOT EXISTS "rankings" (
104
+ "ranking_date" INTEGER, -- Date of the ranking snapshot (YYYYMMDD)
105
+ "rank" INTEGER, -- Player's world ranking on that date
106
+ "player" INTEGER, -- ID of the player (foreign key to players.player_id)
107
+ "points" REAL -- Ranking points on that date
108
+ );
109
+
110
+ General Query Rules
111
+ 1. Use only the tables and columns defined above.
112
+ 2. Use exact column names.
113
+ 3. Only join tables when necessary (e.g., players ↔ rankings ↔ matches via player_id or winner_id/loser_id).
114
+ 4. If a question is ambiguous, choose the most reasonable interpretation.
115
+ 5. Do not hallucinate columns or table names.
116
+
117
+ Use winner_name or loser_name to obtain results for a given player from the matches table. Use tourney_name to obtain information from specific tournaments.
118
+
119
+ To filter by dates, use the date format YYYYMMDD
120
+
121
+ Example User Requests and SQLite Queries
122
+ Request:
123
+ How many players are left-handed?
124
+ SQLite:
125
+ SELECT COUNT(*) FROM players WHERE hand = 'L';
126
+
127
+ Request:
128
+ How many matches at the US Open lasted more than 240 minutes?
129
+ SQLite:
130
+ SELECT COUNT(*) FROM matches WHERE tourney_name = 'US Open' AND minutes > 240;
131
+
132
+ Request:
133
+ What is the shortest match played by Novak Djokovic?
134
+ SQLite:
135
+ SELECT MIN(minutes) FROM matches WHERE winner_name = 'Novak Djokovic' OR loser_name = 'Novak Djokovic';
136
+
137
+ Request:
138
+ What is the maximum number of ranking points held by any player on any date?
139
+ SQLite:
140
+ SELECT MAX(points) AS max_points FROM rankings;"
141
+
142
+ Request:
143
+ How many matches has Roger Federer lost to Andy Murray?
144
+ SQLite:
145
+ SELECT COUNT(*) FROM matches WHERE loser_name = 'Roger Federer' AND winner_name = 'Andy Murray';
146
+
147
+ Request:
148
+ How many players were born before 1980?
149
+ SQLite:
150
+ SELECT COUNT(*) FROM players WHERE dob < 19800101;
151
+
152
+ Generate only the SQLite query prefaced by SQLite: and no other text, do not output an explanation of the query. Now generate an SQLite query for the following user request. Request:
153
+ """
val-16.hf/data-00000-of-00001.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9534fb91c7e59988d642b423f8a1971e6952d2f06d4592230f7970f92967e409
3
+ size 6157304
val-16.hf/dataset_info.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "citation": "",
3
+ "description": "",
4
+ "features": {
5
+ "is_nba": {
6
+ "dtype": "bool",
7
+ "_type": "Value"
8
+ },
9
+ "input_ids": {
10
+ "feature": {
11
+ "dtype": "int32",
12
+ "_type": "Value"
13
+ },
14
+ "_type": "Sequence"
15
+ },
16
+ "attention_mask": {
17
+ "feature": {
18
+ "dtype": "int8",
19
+ "_type": "Value"
20
+ },
21
+ "_type": "Sequence"
22
+ },
23
+ "labels": {
24
+ "feature": {
25
+ "dtype": "int64",
26
+ "_type": "Value"
27
+ },
28
+ "_type": "Sequence"
29
+ }
30
+ },
31
+ "homepage": "",
32
+ "license": ""
33
+ }
val-16.hf/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "6e1d2fd801628821",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": null
13
+ }