Task: equi-join-detect (source dataset: Auto-BI)

Your are given a database with related tables used for business intelligence analysis. Your task is to identify all key/foreign-key join relationships between the tables for this database. Recall that a join is a relationship between two tables, that allows rows from one table to be combined with rows from another, based on a set of common join columns.
 
 
No explanation needed. Please return all join relationships in the following JSON format:
{
  "joins": [
    {
      "from_table": "table-1",
      "from_column": "column-1",
      "to_table": "table-2",
      "to_column": "column-3"
    }, 
	...
  ]
}

Tables:

Table: Categories
|   category_id | category_name   |
|--------------:|:----------------|
|             1 | Produce         |
|             2 | Consumer        |
|             3 | Niche           |
|             4 | Boutique        |
|             5 | Perishable      |
|             6 | Prepared        |
|             7 | Packaged        |
|             8 | Novelty         |
|             9 | Bakery          |
|            10 | Refrigerated    |


Table: Customer
|   id | first_name   | last_name   | email                      | gender   | ip_address      | street_address          | city         |     lat |      lng | country   | image                                                                   |
|-----:|:-------------|:------------|:---------------------------|:---------|:----------------|:------------------------|:-------------|--------:|---------:|:----------|:------------------------------------------------------------------------|
|    3 | Cecilla      | Forsyth     | cforsyth2@imageshack.us    | Female   | 129.107.167.5   | 3107 Armistice Junction | Jiaocha      | 23.4222 | 106.681  | China     | https://robohash.org/undeducimuspariatur.png?size=150x150&set=set1      |
|   16 | Doris        | Lauritzen   | dlauritzenf@instagram.com  | Female   | 198.142.114.41  | 3083 Roxbury Circle     | Linxihe      | 29.6291 | 110.376  | China     | https://robohash.org/temporesequieveniet.png?size=150x150&set=set1      |
|   33 | Gwenore      | Allcoat     | gallcoatw@archive.org      | Female   | 154.159.175.196 | 31245 Westerfield Road  | Youlan       | 48.1283 |  11.5445 | China     | https://robohash.org/eligendimollitiaadipisci.png?size=150x150&set=set1 |
|   40 | Aurelia      | Muffett     | amuffett13@apache.org      | Female   | 94.243.166.17   | 5572 Pankratz Circle    | Heimahe      | 36.7104 |  99.763  | China     | https://robohash.org/commodiblanditiisut.png?size=150x150&set=set1      |
|   53 | Hedda        | Selliman    | hselliman1g@typepad.com    | Female   | 73.88.29.74     | 292 Pleasure Place      | Shengrenjian | 31.3488 | 121.767  | China     | https://robohash.org/nisietnesciunt.png?size=150x150&set=set1           |
|   55 | Kathye       | Coole       | kcoole1i@buzzfeed.com      | Female   | 218.121.165.164 | 420 Susan Center        | Guihuaquan   | 29.5559 | 113.878  | China     | https://robohash.org/esseremmolestiae.png?size=150x150&set=set1         |
|   63 | Trixie       | Lively      | tlively1q@reuters.com      | Female   | 115.116.63.54   | 3920 Dovetail Parkway   | Xiajiashan   | 29.6773 | 104.747  | China     | https://robohash.org/debitisestvoluptas.png?size=150x150&set=set1       |
|   65 | Karoline     | Delion      | kdelion1s@cdbaby.com       | Female   | 239.77.207.9    | 2740 Spohn Parkway      | Honggang     | 46.3984 | 124.891  | China     | https://robohash.org/voluptasquivoluptatem.png?size=150x150&set=set1    |
|   79 | Darryl       | Shoutt      | dshoutt26@sogou.com        | Female   | 163.104.105.224 | 64254 Miller Lane       | Nanqiao      | 32.2002 | 118.417  | China     | https://robohash.org/quiquoquis.png?size=150x150&set=set1               |
|   83 | Angele       | Mockler     | amockler2a@telegraph.co.uk | Female   | 197.91.216.174  | 5 Quincy Terrace        | Handegate    | 32.2875 | 105.523  | China     | https://robohash.org/doloribusdoloremqui.png?size=150x150&set=set1      |


Table: Groceries
|   product_id |   category_id | product_name                 |   price |
|-------------:|--------------:|:-----------------------------|--------:|
|            1 |             3 | Pepper - Yellow Bell         |    6.18 |
|            2 |             4 | Sour Puss Raspberry          |   35.93 |
|            3 |             5 | Beer - Corona                |   38.16 |
|            4 |             2 | Gingerale - Diet - Schweppes |   78.09 |
|            5 |             7 | Tea - Lemon Green Tea        |   37.11 |
|            6 |             8 | Tart Shells - Savory, 4      |   31.81 |
|            7 |             2 | Wine - White, Ej             |   43.57 |
|            8 |             2 | Star Anise, Whole            |   21.14 |
|            9 |             5 | Beer - Camerons Auburn       |   15.21 |
|           10 |             7 | Coke - Classic, 355 Ml       |   31.46 |


Table: Invoice
|   invoice_id | invoice_date            |   customer_id |
|-------------:|:------------------------|--------------:|
|            1 | 2017-05-16 00:00:00.000 |            12 |
|            2 | 2016-07-22 00:00:00.000 |            43 |
|            3 | 2017-08-23 00:00:00.000 |            60 |
|            4 | 2016-12-30 00:00:00.000 |            76 |
|            5 | 2017-12-15 00:00:00.000 |             4 |
|            6 | 2016-12-11 00:00:00.000 |            46 |
|            7 | 2017-02-08 00:00:00.000 |            39 |
|            8 | 2018-04-15 00:00:00.000 |            95 |
|            9 | 2016-06-17 00:00:00.000 |            84 |
|           10 | 2017-06-03 00:00:00.000 |            88 |


Table: Orders
|   order_id |   invoice_id |   product_id |   count |   discount |
|-----------:|-------------:|-------------:|--------:|-----------:|
|          2 |            3 |           91 |      76 |          1 |
|          4 |           16 |            7 |      24 |          1 |
|          5 |           58 |           60 |      40 |          1 |
|          6 |           13 |            8 |      94 |          1 |
|          8 |           59 |           12 |      41 |          1 |
|          9 |           42 |           47 |      83 |          1 |
|         11 |           52 |           69 |      78 |          1 |
|         12 |           52 |            5 |      19 |          1 |
|         13 |           11 |           79 |      38 |          1 |
|         14 |           98 |           61 |      87 |          1 |

 


tables: name: Categories
data: Categories.csv
name: Customer
data: Customer.csv
name: Groceries
data: Groceries.csv
name: Invoice
data: Invoice.csv
name: Orders
data: Orders.csv
label: Groceries
category_id
Categories
category_id
Invoice
customer_id
Customer
id
Orders
product_id
Groceries
product_id
Orders
invoice_id
Invoice
invoice_id
output: {
    "joins": [
        {
            "from_table": "Groceries",
            "from_column": "category_id",
            "to_table": "Categories",
            "to_column": "category_id"
        },
        {
            "from_table": "Invoice",
            "from_column": "customer_id",
            "to_table": "Customer",
            "to_column": "id"
        },
        {
            "from_table": "Orders",
            "from_column": "product_id",
            "to_table": "Groceries",
            "to_column": "product_id"
        },
        {
            "from_table": "Orders",
            "from_column": "invoice_id",
            "to_table": "Invoice",
            "to_column": "invoice_id"
        }
    ]
}