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: dimCrime
|   CrimeTypeKey | CrimebizKey          | Crime Type   |
|---------------:|:---------------------|:-------------|
|              1 | HOMICIDE             | Violent      |
|              2 | AGG ASSAULT          | Violent      |
|              3 | LARCENY-FROM VEHICLE | Larceny      |
|              4 | LARCENY-NON VEHICLE  | Larceny      |
|              5 | AUTO THEFT           | Vehicle      |
|              6 | BURGLARY-RESIDENCE   | Burglary     |
|              7 | ROBBERY-PEDESTRIAN   | Robbery      |
|              8 | ROBBERY-COMMERCIAL   | Robbery      |
|              9 | ROBBERY-RESIDENCE    | Robbery      |
|             10 | BURGLARY-NONRES      | Burglary     |


Table: dimDate
|   index | date                    |   year |   month_no | week   |   day_no | month   | Weekday   |   datekey |   dayinweek |
|--------:|:------------------------|-------:|-----------:|:-------|---------:|:--------|:----------|----------:|------------:|
|    1095 | 2012-01-01 00:00:00.000 |   2012 |          1 |        |        1 | January | Sunday    |  20120101 |           7 |
|    1096 | 2012-01-02 00:00:00.000 |   2012 |          1 |        |        2 | January | Monday    |  20120102 |           1 |
|    1097 | 2012-01-03 00:00:00.000 |   2012 |          1 |        |        3 | January | Tuesday   |  20120103 |           2 |
|    1098 | 2012-01-04 00:00:00.000 |   2012 |          1 |        |        4 | January | Wednesday |  20120104 |           3 |
|    1099 | 2012-01-05 00:00:00.000 |   2012 |          1 |        |        5 | January | Thursday  |  20120105 |           4 |
|    1100 | 2012-01-06 00:00:00.000 |   2012 |          1 |        |        6 | January | Friday    |  20120106 |           5 |
|    1101 | 2012-01-07 00:00:00.000 |   2012 |          1 |        |        7 | January | Saturday  |  20120107 |           6 |
|    1102 | 2012-01-08 00:00:00.000 |   2012 |          1 |        |        8 | January | Sunday    |  20120108 |           7 |
|    1103 | 2012-01-09 00:00:00.000 |   2012 |          1 |        |        9 | January | Monday    |  20120109 |           1 |
|    1104 | 2012-01-10 00:00:00.000 |   2012 |          1 |        |       10 | January | Tuesday   |  20120110 |           2 |


Table: dimNeighborhood
|   NeighborhoodKey | Neighborhood              | District                  |
|------------------:|:--------------------------|:--------------------------|
|                86 | Adair Park                | Fulton County: SW Atlanta |
|                87 | Adams Park                | Fulton County: SW Atlanta |
|                88 | Adamsville                | Fulton County: SW Atlanta |
|                89 | Arlington Estates         | Fulton County: SW Atlanta |
|                90 | Ashley Collegetown        | Fulton County: SW Atlanta |
|                91 | Ashley Courts             | Fulton County: SW Atlanta |
|                92 | Ashview Heights           | Fulton County: SW Atlanta |
|                93 | Atlanta University Center | Fulton County: SW Atlanta |
|                94 | Audobon Forest            | Fulton County: SW Atlanta |
|                95 | Audobon Forest West       | Fulton County: SW Atlanta |


Table: factCrime
|   crimeEventId |   crimeTypeKey |   dateKey | weatherKey   |   neighborhoodKey |     lat |     long |   beat | npu   |
|---------------:|---------------:|----------:|:-------------|------------------:|--------:|---------:|-------:|:------|
|            175 |              3 |  20101030 |              |               247 | 33.7573 | -84.3899 |    508 | M     |
|            966 |              3 |  20101022 |              |               247 | 33.7573 | -84.3899 |    508 | M     |
|           1243 |              3 |  20101020 |              |               247 | 33.7573 | -84.3899 |    508 | M     |
|           1674 |              3 |  20101016 |              |               247 | 33.7573 | -84.3899 |    508 | M     |
|           1843 |              3 |  20101014 |              |               247 | 33.7573 | -84.3899 |    508 | M     |
|           2270 |              3 |  20101010 |              |               247 | 33.7573 | -84.3899 |    508 | M     |
|           2947 |              3 |  20101003 |              |               247 | 33.7573 | -84.3899 |    508 | M     |
|           4020 |              3 |  20111023 |              |               247 | 33.7573 | -84.3899 |    508 | M     |
|           5240 |              3 |  20111010 |              |               247 | 33.7573 | -84.3899 |    508 | M     |
|          19802 |              3 |  20091024 |              |               247 | 33.7573 | -84.3899 |    508 | M     |


Table: propertysales
|   SalesKey | Region                                | Month   |   MonthNo |   Year |   Median_price | NeighborhoodKey   |   datekey |
|-----------:|:--------------------------------------|:--------|----------:|-------:|---------------:|:------------------|----------:|
|          5 | Arden-Habersham                       | January |         1 |   2012 |        1372714 |                   |   2012101 |
|         13 | Audobon Forest                        | January |         1 |   2012 |         154000 |                   |   2012101 |
|         14 | Audobon Forest West                   | January |         1 |   2012 |          54000 |                   |   2012101 |
|         18 | Bankhead-Bolton                       | January |         1 |   2012 |          13000 |                   |   2012101 |
|         26 | Blair Villa-Poole Creek               | January |         1 |   2012 |          13000 |                   |   2012101 |
|         37 | Brookwood Hills Conservation District | January |         1 |   2012 |         675000 |                   |   2012101 |
|         39 | Buckhead                              | January |         1 |   2012 |         262000 |                   |   2012101 |
|         51 | Cascade Avenue                        | January |         1 |   2012 |          16000 |                   |   2012101 |
|         54 | Castleberry Hill Landmark District    | January |         1 |   2012 |          70000 |                   |   2012101 |
|         56 | Centennial Hill                       | January |         1 |   2012 |          99000 |                   |   2012101 |


Table: weather
|   WeatherKey |   DateKey | description   |   temperature (C) |
|-------------:|----------:|:--------------|------------------:|
|           13 |  20121014 | sky is clear  |           14.91   |
|           16 |  20121017 | sky is clear  |            8.34   |
|           17 |  20121018 | sky is clear  |           10.09   |
|           19 |  20121020 | sky is clear  |            7.57   |
|           20 |  20121021 | sky is clear  |            7.9375 |
|           21 |  20121022 | sky is clear  |            8.8075 |
|           22 |  20121023 | sky is clear  |            8.21   |
|           25 |  20121026 | sky is clear  |           11.97   |
|           26 |  20121027 | sky is clear  |           14.83   |
|           30 |  20121031 | sky is clear  |            5.26   |

 


tables: name: dimCrime
data: dimCrime.csv
name: dimDate
data: dimDate.csv
name: dimNeighborhood
data: dimNeighborhood.csv
name: factCrime
data: factCrime.csv
name: propertysales
data: propertysales.csv
name: weather
data: weather.csv
label: weather
DateKey
dimDate
datekey
propertysales
NeighborhoodKey
dimNeighborhood
NeighborhoodKey
factCrime
dateKey
dimDate
datekey
factCrime
crimeTypeKey
dimCrime
CrimeTypeKey
factCrime
neighborhoodKey
dimNeighborhood
NeighborhoodKey
output: {
    "joins": [
        {
            "from_table": "weather",
            "from_column": "DateKey",
            "to_table": "dimDate",
            "to_column": "datekey"
        },
        {
            "from_table": "propertysales",
            "from_column": "NeighborhoodKey",
            "to_table": "dimNeighborhood",
            "to_column": "NeighborhoodKey"
        },
        {
            "from_table": "factCrime",
            "from_column": "dateKey",
            "to_table": "dimDate",
            "to_column": "datekey"
        },
        {
            "from_table": "factCrime",
            "from_column": "crimeTypeKey",
            "to_table": "dimCrime",
            "to_column": "CrimeTypeKey"
        },
        {
            "from_table": "factCrime",
            "from_column": "neighborhoodKey",
            "to_table": "dimNeighborhood",
            "to_column": "NeighborhoodKey"
        }
    ]
}