File size: 1,699 Bytes
02edc38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
{
  "qid": "012",
  "task_type": "ambig",
  "has_intended_resolution": true,
  "language": "SQLite",
  "db": "retails",
  "question": "List all suppliers with a high balance.",
  "gold_ambiguity_points": [
    {
      "id": "A",
      "phrase": "high balance",
      "type": "infinite",
      "ambiguity_type": "semantic_value",
      "parameter_name": "balance_threshold",
      "parameter_dtype": "int",
      "parameter_sample_operators": [
        ">",
        ">="
      ],
      "parameter_sample_values": [
        8500,
        9000,
        9500
      ],
      "intended_parameter_operator": ">=",
      "intended_parameter_value": 8500
    }
  ],
  "gold_intended_query_id": "GQRY",
  "extra_info": {}
}
*/


----- START OF GOLD QUERY `GQRY` -----
/*
{
  "id": "GQRY",
  "parameter_names": [
    "balance_threshold"
  ],
  "parameter_values": {
    "balance_threshold": 8500
  },
  "other_exec_results": [],
  "required_columns": [
    1
  ],
  "required_sorted": false,
  "extra_info": {
    "ambiguity_resolution": {
      "[A] high balance": ":balance_threshold"
    }
  }
}
*/
SELECT s_suppkey, s_name, s_acctbal
FROM supplier
WHERE s_acctbal >= :balance_threshold;
/* EXEC RESULT
 s_suppkey             s_name  s_acctbal
         3 Supplier#000000003    9159.78
         4 Supplier#000000004    9846.01
        17 Supplier#000000017    8809.66
        18 Supplier#000000018    8914.76
        21 Supplier#000000021    9415.02
... TRUNCATED ...
      9957 Supplier#000009957    9180.69
      9971 Supplier#000009971    8754.40
      9987 Supplier#000009987    9079.12
      9990 Supplier#000009990    9434.07
      9991 Supplier#000009991    9965.05
*/
----- END OF GOLD QUERY -----