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: Budget 2016
| Country   | State           | Product Category   |    Profit Budget |   YTD Profit Budget |
|:----------|:----------------|:-------------------|-----------------:|--------------------:|
| Australia | New South Wales | Accessories        |  36218.7         |            21127.6  |
| Australia | New South Wales | Bikes              |      1.10576e+06 |           645028    |
| Australia | New South Wales | Clothing           |  19616           |            11442.7  |
| Australia | Queensland      | Accessories        |  18860           |            11001.7  |
| Australia | Queensland      | Bikes              | 600449           |           350262    |
| Australia | Queensland      | Clothing           |   8841.33        |             5157.44 |
| Australia | South Australia | Accessories        |   6024           |             3514    |
| Australia | South Australia | Bikes              | 182623           |           106530    |
| Australia | South Australia | Clothing           |   2298.67        |             1340.89 |
| Australia | Tasmania        | Accessories        |   1876           |             1094.33 |


Table: Customer Activity Status
|   Customer ID | Last Transaction Date   |   Time Interval (months) | Customer Status   |
|--------------:|:------------------------|-------------------------:|:------------------|
|         11510 | 2016-06-28 00:00:00.000 |                        1 | Active            |
|         12271 | 2016-06-28 00:00:00.000 |                        1 | Active            |
|         12302 | 2016-06-28 00:00:00.000 |                        1 | Active            |
|         12369 | 2016-06-28 00:00:00.000 |                        1 | Active            |
|         12583 | 2016-06-28 00:00:00.000 |                        1 | Active            |
|         12784 | 2016-06-28 00:00:00.000 |                        1 | Active            |
|         13116 | 2016-06-28 00:00:00.000 |                        1 | Active            |
|         13120 | 2016-06-28 00:00:00.000 |                        1 | Active            |
|         13155 | 2016-06-28 00:00:00.000 |                        1 | Active            |
|         13228 | 2016-06-28 00:00:00.000 |                        1 | Active            |


Table: Customer Details
|   Customer ID | MaritalStatus   |   YearlyIncome | Education       |   Customer Age | Age Group      | Customer Gender   | State      | Country       | Income Bucket   | Age Bracket   |
|--------------:|:----------------|---------------:|:----------------|---------------:|:---------------|:------------------|:-----------|:--------------|:----------------|:--------------|
|         11194 | Married         |          60000 | Bachelors       |             52 | Adults (35-64) | Female            | California | United States | Medium Income   | Adult(35-64)  |
|         11208 | Married         |          60000 | Bachelors       |             49 | Adults (35-64) | Female            | California | United States | Medium Income   | Adult(35-64)  |
|         11220 | Married         |          60000 | Partial College |             47 | Adults (35-64) | Female            | California | United States | Medium Income   | Adult(35-64)  |
|         11227 | Single          |          60000 | Partial College |             46 | Adults (35-64) | Male              | California | United States | Medium Income   | Adult(35-64)  |
|         11731 | Married         |          60000 | Partial College |             37 | Adults (35-64) | Female            | California | United States | Medium Income   | Adult(35-64)  |
|         11733 | Married         |          60000 | Partial College |             38 | Adults (35-64) | Female            | California | United States | Medium Income   | Adult(35-64)  |
|         11736 | Married         |          60000 | Partial College |             38 | Adults (35-64) | Male              | California | United States | Medium Income   | Adult(35-64)  |
|         11866 | Married         |          60000 | Partial College |             36 | Adults (35-64) | Male              | California | United States | Medium Income   | Adult(35-64)  |
|         11881 | Married         |          60000 | Bachelors       |             38 | Adults (35-64) | Male              | California | United States | Medium Income   | Adult(35-64)  |
|         12079 | Married         |          60000 | Bachelors       |             52 | Adults (35-64) | Male              | California | United States | Medium Income   | Adult(35-64)  |


Table: Geography
| State             | Country   |
|:------------------|:----------|
| New South Wales   | Australia |
| Queensland        | Australia |
| South Australia   | Australia |
| Tasmania          | Australia |
| Victoria          | Australia |
| Alberta           | Canada    |
| British Columbia  | Canada    |
| Charente-Maritime | France    |
| Essonne           | France    |
| Garonne (Haute)   | France    |


Table: Products
| Product Category   |
|:-------------------|
| Accessories        |
| Bikes              |
| Clothing           |


Table: Transaction Details
| Date                    |   Customer ID | Product Category   | Sub Category    |   Order Quantity |   Unit Cost |   Unit Price |   Revenue |   Profit |   Cost |
|:------------------------|--------------:|:-------------------|:----------------|-----------------:|------------:|-------------:|----------:|---------:|-------:|
| 2014-05-01 00:00:00.000 |         11219 | Accessories        | Tires and Tubes |                6 |           1 |            2 |        12 |        6 |      6 |
| 2016-05-01 00:00:00.000 |         11219 | Accessories        | Tires and Tubes |                6 |           1 |            2 |        12 |        6 |      6 |
| 2013-12-10 00:00:00.000 |         11233 | Accessories        | Tires and Tubes |                6 |           1 |            2 |        12 |        6 |      6 |
| 2016-02-04 00:00:00.000 |         11233 | Accessories        | Tires and Tubes |                6 |           1 |            2 |        12 |        6 |      6 |
| 2013-11-22 00:00:00.000 |         11258 | Accessories        | Tires and Tubes |                6 |           1 |            2 |        12 |        6 |      6 |
| 2015-08-04 00:00:00.000 |         11263 | Accessories        | Tires and Tubes |                6 |           1 |            2 |        12 |        6 |      6 |
| 2015-10-01 00:00:00.000 |         11263 | Accessories        | Tires and Tubes |                6 |           1 |            2 |        12 |        6 |      6 |
| 2013-11-21 00:00:00.000 |         11263 | Accessories        | Tires and Tubes |                6 |           1 |            2 |        12 |        6 |      6 |
| 2014-07-03 00:00:00.000 |         11312 | Accessories        | Tires and Tubes |                6 |           1 |            2 |        12 |        6 |      6 |
| 2016-07-03 00:00:00.000 |         11312 | Accessories        | Tires and Tubes |                6 |           1 |            2 |        12 |        6 |      6 |

 


tables: name: Budget 2016
data: Budget 2016.csv
name: Customer Activity Status
data: Customer Activity Status.csv
name: Customer Details
data: Customer Details.csv
name: Geography
data: Geography.csv
name: Products
data: Products.csv
name: Transaction Details
data: Transaction Details.csv
label: Transaction Details
Customer ID
Customer Details
Customer ID
Customer Details
State
Geography
State
Budget 2016
State
Geography
State
Budget 2016
Product Category
Products
Product Category
Customer Details
Customer ID
Customer Activity Status
Customer ID
Transaction Details
Product Category
Products
Product Category
output: {
    "joins": [
        {
            "from_table": "Transaction Details",
            "from_column": "Customer ID",
            "to_table": "Customer Details",
            "to_column": "Customer ID"
        },
        {
            "from_table": "Customer Details",
            "from_column": "State",
            "to_table": "Geography",
            "to_column": "State"
        },
        {
            "from_table": "Budget 2016",
            "from_column": "State",
            "to_table": "Geography",
            "to_column": "State"
        },
        {
            "from_table": "Budget 2016",
            "from_column": "Product Category",
            "to_table": "Products",
            "to_column": "Product Category"
        },
        {
            "from_table": "Customer Details",
            "from_column": "Customer ID",
            "to_table": "Customer Activity Status",
            "to_column": "Customer ID"
        },
        {
            "from_table": "Transaction Details",
            "from_column": "Product Category",
            "to_table": "Products",
            "to_column": "Product Category"
        }
    ]
}