Datasets:

Modalities:
Text
Formats:
text
Size:
< 1K
ArXiv:
Libraries:
Datasets
License:
File size: 2,668 Bytes
3e7c527
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{
    "label_id": null, 
    "data": [
        {
            "nl": "Select all warehouses.\n", 
            "id": 0, 
            "sql": "select * from warehouses;\n"
        }, 
        {
            "nl": "Select all boxes with a value larger than $150.\n", 
            "id": 1, 
            "sql": "select * from boxes where Value>150;\n"
        }, 
        {
            "nl": "Select all distinct contents in all the boxes.\n", 
            "id": 2, 
            "sql": "select distinct contents from boxes;\n"
        }, 
        {
            "nl": "Select the average value of all the boxes.\n", 
            "id": 3, 
            "sql": "select avg(value) from boxes;\n"
        }, 
        {
            "nl": "Select the warehouse code and the average value of the boxes in each warehouse.\n", 
            "id": 4, 
            "sql": "select warehouse, avg(value) from boxes group by warehouse;\n"
        }, 
        {
            "nl": "Same as previous exercise, but select only those warehouses where the average value of the boxes is greater than 150.\n", 
            "id": 5, 
            "sql": "select warehouse, avg(value) \nfrom boxes \ngroup by warehouse\nhaving avg(value)> 150;\n"
        }, 
        {
            "nl": "Select the code of each box, along with the name of the city the box is located in.\n", 
            "id": 6, 
            "sql": "select boxes.code, warehouses.location\nfrom boxes join warehouses\non boxes.Warehouse = Warehouses.Code;\nSELECT Boxes.Code, Location\n      FROM Warehouses \nINNER JOIN Boxes ON Warehouses.Code = Boxes.Warehouse;\n"
        }, 
        {
            "nl": "Select the warehouse codes, along with the number of boxes in each warehouse. \n", 
            "id": 7, 
            "sql": "select Warehouse, count(*) \nfrom boxes \ngroup by warehouse;\n"
        }, 
        {
            "nl": "Select the codes of all warehouses that are saturated (a warehouse is saturated if the number of boxes in it is larger than the warehouse's capacity).\n", 
            "id": 8, 
            "sql": "SELECT Code\n   FROM Warehouses\n   WHERE Capacity <\n   (\n     SELECT COUNT(*)\n       FROM Boxes\n       WHERE Warehouse = Warehouses.Code\n   );\n"
        }, 
        {
            "nl": "Select the codes of all the boxes located in Chicago.", 
            "id": 9, 
            "sql": "select Boxes.code \nfrom boxes join Warehouses\non boxes.warehouse = warehouses.code\nwhere warehouses.location = 'Chicago';\nSELECT Code\nFROM Boxes\n   WHERE Warehouse IN\n   (\n     SELECT Code\n       FROM Warehouses\n       WHERE Location = 'Chicago'\n   );"
        }
    ], 
    "review_id": null
}