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: customers
|   id | company   | last_name        | first_name   | email_address   | job_title                 | debt   | business_phone   | home_phone   | mobile_phone   | fax_number    | address         | city           | state_province   |   zip_postal_code | country_region   | web_page   |
|-----:|:----------|:-----------------|:-------------|:----------------|:--------------------------|:-------|:-----------------|:-------------|:---------------|:--------------|:----------------|:---------------|:-----------------|------------------:|:-----------------|:-----------|
|    1 | Company A | Bedecs           | Anna         |                 | Owner                     | 10     | (123)555-0100    |              |                | (123)555-0101 | 123 1st Street  | Seattle        | WA               |             99999 | USA              |            |
|    2 | Company B | Gratacos Solsona | Antonio      |                 | Owner                     |        | (123)555-0100    |              |                | (123)555-0101 | 123 2nd Street  | Boston         | MA               |             99999 | USA              |            |
|    3 | Company C | Axen             | Thomas       |                 | Purchasing Representative | 30     | (123)555-0100    |              |                | (123)555-0101 | 123 3rd Street  | Los Angelas    | CA               |             99999 | USA              |            |
|    4 | Company D | Lee              | Christina    |                 | Purchasing Manager        |        | (123)555-0100    |              |                | (123)555-0101 | 123 4th Street  | New York       | NY               |             99999 | USA              |            |
|    5 | Company E | O’Donnell        | Martin       |                 | Owner                     | 15     | (123)555-0100    |              |                | (123)555-0101 | 123 5th Street  | Minneapolis    | MN               |             99999 | USA              |            |
|    6 | Company F | Pérez-Olaeta     | Francisco    |                 | Purchasing Manager        |        | (123)555-0100    |              |                | (123)555-0101 | 123 6th Street  | Milwaukee      | WI               |             99999 | USA              |            |
|    7 | Company G | Xie              | Ming-Yang    |                 | Owner                     | 20     | (123)555-0100    |              |                | (123)555-0101 | 123 7th Street  | Boise          | ID               |             99999 | USA              |            |
|    8 | Company H | Andersen         | Elizabeth    |                 | Purchasing Representative | 5      | (123)555-0100    |              |                | (123)555-0101 | 123 8th Street  | Portland       | OR               |             99999 | USA              |            |
|    9 | Company I | Mortensen        | Sven         |                 | Purchasing Manager        |        | (123)555-0100    |              |                | (123)555-0101 | 123 9th Street  | Salt Lake City | UT               |             99999 | USA              |            |
|   10 | Company J | Wacker           | Roland       |                 | Purchasing Manager        | 25     | (123)555-0100    |              |                | (123)555-0101 | 123 10th Street | Chicago        | IL               |             99999 | USA              |            |


Table: employees
|   id | company           | last_name      | first_name   | email_address                | job_title             | business_phone   | home_phone    | mobile_phone   | fax_number    | address        | city     | state_province   |   zip_postal_code | country_region   | web_page                                                  | notes                                                                                                                   |
|-----:|:------------------|:---------------|:-------------|:-----------------------------|:----------------------|:-----------------|:--------------|:---------------|:--------------|:---------------|:---------|:-----------------|------------------:|:-----------------|:----------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------|
|    1 | Northwind Traders | Freehafer      | Nancy        | nancy@northwindtraders.com   | Sales Representative  | (123)555-0100    | (123)555-0102 |                | (123)555-0103 | 123 1st Avenue | Seattle  | WA               |             99999 | USA              | #http://northwindtraders.com#                             |                                                                                                                         |
|    2 | Northwind Traders | Cencini        | Andrew       | andrew@northwindtraders.com  | Vice President, Sales | (123)555-0100    | (123)555-0102 |                | (123)555-0103 | 123 2nd Avenue | Bellevue | WA               |             99999 | USA              | http://northwindtraders.com#http://northwindtraders.com/# | Joined the company as a sales representative, was promoted to sales manager and was then named vice president of sales. |
|    3 | Northwind Traders | Kotas          | Jan          | jan@northwindtraders.com     | Sales Representative  | (123)555-0100    | (123)555-0102 |                | (123)555-0103 | 123 3rd Avenue | Redmond  | WA               |             99999 | USA              | http://northwindtraders.com#http://northwindtraders.com/# | Was hired as a sales associate and was promoted to sales representative.                                                |
|    4 | Northwind Traders | Sergienko      | Mariya       | mariya@northwindtraders.com  | Sales Representative  | (123)555-0100    | (123)555-0102 |                | (123)555-0103 | 123 4th Avenue | Kirkland | WA               |             99999 | USA              | http://northwindtraders.com#http://northwindtraders.com/# |                                                                                                                         |
|    5 | Northwind Traders | Thorpe         | Steven       | steven@northwindtraders.com  | Sales Manager         | (123)555-0100    | (123)555-0102 |                | (123)555-0103 | 123 5th Avenue | Seattle  | WA               |             99999 | USA              | http://northwindtraders.com#http://northwindtraders.com/# | Joined the company as a sales representative and was promoted to sales manager.  Fluent in French.                      |
|    6 | Northwind Traders | Neipper        | Michael      | michael@northwindtraders.com | Sales Representative  | (123)555-0100    | (123)555-0102 |                | (123)555-0103 | 123 6th Avenue | Redmond  | WA               |             99999 | USA              | http://northwindtraders.com#http://northwindtraders.com/# | Fluent in Japanese and can read and write French, Portuguese, and Spanish.                                              |
|    7 | Northwind Traders | Zare           | Robert       | robert@northwindtraders.com  | Sales Representative  | (123)555-0100    | (123)555-0102 |                | (123)555-0103 | 123 7th Avenue | Seattle  | WA               |             99999 | USA              | http://northwindtraders.com#http://northwindtraders.com/# |                                                                                                                         |
|    8 | Northwind Traders | Giussani       | Laura        | laura@northwindtraders.com   | Sales Coordinator     | (123)555-0100    | (123)555-0102 |                | (123)555-0103 | 123 8th Avenue | Redmond  | WA               |             99999 | USA              | http://northwindtraders.com#http://northwindtraders.com/# | Reads and writes French.                                                                                                |
|    9 | Northwind Traders | Hellung-Larsen | Anne         | anne@northwindtraders.com    | Sales Representative  | (123)555-0100    | (123)555-0102 |                | (123)555-0103 | 123 9th Avenue | Seattle  | WA               |             99999 | USA              | http://northwindtraders.com#http://northwindtraders.com/# | Fluent in French and German.                                                                                            |


Table: employee_privileges
|   employee_id |   privilege_id |
|--------------:|---------------:|
|             2 |              2 |


Table: inactive_customers
|   customer_id | company   | last_name        | first_name    |
|--------------:|:----------|:-----------------|:--------------|
|             2 | Company B | Gratacos Solsona | Antonio       |
|             5 | Company E | O’Donnell        | Martin        |
|            13 | Company M | Ludick           | Andre         |
|            14 | Company N | Grilo            | Carlos        |
|            15 | Company O | Kupkova          | Helena        |
|            16 | Company P | Goldschmidt      | Daniel        |
|            17 | Company Q | Bagel            | Jean Philippe |
|            18 | Company R | Autier Miconi    | Catherine     |
|            19 | Company S | Eggerer          | Alexander     |
|            20 | Company T | Li               | George        |


Table: inventory_transactions
|   id |   transaction_type | transaction_created_date   | transaction_modified_date   |   product_id |   quantity | purchase_order_id   | customer_order_id   | comments   |
|-----:|-------------------:|:---------------------------|:----------------------------|-------------:|-----------:|:--------------------|:--------------------|:-----------|
|   35 |                  1 | 2006-03-22 00:00:00.000    | 2006-03-22 00:00:00.000     |           80 |         75 |                     |                     |            |
|   36 |                  1 | 2006-03-22 00:00:00.000    | 2006-03-22 00:00:00.000     |           72 |         40 |                     |                     |            |
|   37 |                  1 | 2006-03-22 00:00:00.000    | 2006-03-22 00:00:00.000     |           52 |        100 |                     |                     |            |
|   38 |                  1 | 2006-03-22 00:00:00.000    | 2006-03-22 00:00:00.000     |           56 |        120 |                     |                     |            |
|   39 |                  1 | 2006-03-22 00:00:00.000    | 2006-03-22 00:00:00.000     |           57 |         80 |                     |                     |            |
|   40 |                  1 | 2006-03-22 00:00:00.000    | 2006-03-22 00:00:00.000     |            6 |        100 |                     |                     |            |
|   41 |                  1 | 2006-03-22 00:00:00.000    | 2006-03-22 00:00:00.000     |            7 |         40 |                     |                     |            |
|   42 |                  1 | 2006-03-22 00:00:00.000    | 2006-03-22 00:00:00.000     |            8 |         40 |                     |                     |            |
|   43 |                  1 | 2006-03-22 00:00:00.000    | 2006-03-22 00:00:00.000     |           14 |         40 |                     |                     |            |
|   44 |                  1 | 2006-03-22 00:00:00.000    | 2006-03-22 00:00:00.000     |           17 |         40 |                     |                     |            |


Table: inventory_transaction_types
|   id | type_name   |
|-----:|:------------|
|    1 | Purchased   |
|    2 | Sold        |
|    3 | On Hold     |
|    4 | Waste       |


Table: invoices
|   id |   order_id | invoice_date            | due_date   |   tax |   shipping |   amount_due |
|-----:|-----------:|:------------------------|:-----------|------:|-----------:|-------------:|
|    5 |         31 | 2006-03-22 00:00:00.000 |            |     0 |          0 |            0 |
|    6 |         32 | 2006-03-22 00:00:00.000 |            |     0 |          0 |            0 |
|    7 |         40 | 2006-03-24 00:00:00.000 |            |     0 |          0 |            0 |
|    8 |         39 | 2006-03-24 00:00:00.000 |            |     0 |          0 |            0 |
|    9 |         38 | 2006-03-24 00:00:00.000 |            |     0 |          0 |            0 |
|   10 |         37 | 2006-03-24 00:00:00.000 |            |     0 |          0 |            0 |
|   11 |         36 | 2006-03-24 00:00:00.000 |            |     0 |          0 |            0 |
|   12 |         35 | 2006-03-24 00:00:00.000 |            |     0 |          0 |            0 |
|   13 |         34 | 2006-03-24 00:00:00.000 |            |     0 |          0 |            0 |
|   14 |         33 | 2006-03-24 00:00:00.000 |            |     0 |          0 |            0 |


Table: orders
|   id |   employee_id |   customer_id | order_date              | shipped_date            |   shipper_id | ship_name              | ship_address    | ship_city   | ship_state_province   |   ship_zip_postal_code | ship_country_region   |   shipping_fee |   taxes | payment_type   | paid_date               | notes   |   tax_rate | tax_status_id   |   status_id |   Days_between_orderDate_and_shippedDate |   days_from_deliver_to_payment |
|-----:|--------------:|--------------:|:------------------------|:------------------------|-------------:|:-----------------------|:----------------|:------------|:----------------------|-----------------------:|:----------------------|---------------:|--------:|:---------------|:------------------------|:--------|-----------:|:----------------|------------:|-----------------------------------------:|-------------------------------:|
|   30 |             9 |            27 | 2006-01-15 00:00:00.000 | 2006-01-22 00:00:00.000 |            2 | Karen Toh              | 789 27th Street | Las Vegas   | NV                    |                  99999 | USA                   |            200 |       0 | Check          | 2006-01-15 00:00:00.000 |         |          0 |                 |           3 |                                        7 |                             -7 |
|   31 |             3 |             4 | 2006-01-20 00:00:00.000 | 2006-01-22 00:00:00.000 |            1 | Christina Lee          | 123 4th Street  | New York    | NY                    |                  99999 | USA                   |              5 |       0 | Credit Card    | 2006-01-20 00:00:00.000 |         |          0 |                 |           3 |                                        2 |                             -2 |
|   32 |             4 |            12 | 2006-01-22 00:00:00.000 | 2006-01-22 00:00:00.000 |            2 | John Edwards           | 123 12th Street | Las Vegas   | NV                    |                  99999 | USA                   |              5 |       0 | Credit Card    | 2006-01-22 00:00:00.000 |         |          0 |                 |           3 |                                        0 |                              0 |
|   33 |             6 |             8 | 2006-01-30 00:00:00.000 | 2006-01-31 00:00:00.000 |            3 | Elizabeth Andersen     | 123 8th Street  | Portland    | OR                    |                  99999 | USA                   |             50 |       0 | Credit Card    | 2006-01-30 00:00:00.000 |         |          0 |                 |           3 |                                        1 |                             -1 |
|   34 |             9 |             4 | 2006-02-06 00:00:00.000 | 2006-02-07 00:00:00.000 |            3 | Christina Lee          | 123 4th Street  | New York    | NY                    |                  99999 | USA                   |              4 |       0 | Check          | 2006-02-06 00:00:00.000 |         |          0 |                 |           3 |                                        1 |                             -1 |
|   35 |             3 |            29 | 2006-02-10 00:00:00.000 | 2006-02-12 00:00:00.000 |            2 | Soo Jung Lee           | 789 29th Street | Denver      | CO                    |                  99999 | USA                   |              7 |       0 | Check          | 2006-02-10 00:00:00.000 |         |          0 |                 |           3 |                                        2 |                             -2 |
|   36 |             4 |             3 | 2006-02-23 00:00:00.000 | 2006-02-25 00:00:00.000 |            2 | Thomas Axen            | 123 3rd Street  | Los Angelas | CA                    |                  99999 | USA                   |              7 |       0 | Cash           | 2006-02-23 00:00:00.000 |         |          0 |                 |           3 |                                        2 |                             -2 |
|   37 |             8 |             6 | 2006-03-06 00:00:00.000 | 2006-03-09 00:00:00.000 |            2 | Francisco Pérez-Olaeta | 123 6th Street  | Milwaukee   | WI                    |                  99999 | USA                   |             12 |       0 | Credit Card    | 2006-03-06 00:00:00.000 |         |          0 |                 |           3 |                                        3 |                             -3 |
|   38 |             9 |            28 | 2006-03-10 00:00:00.000 | 2006-03-11 00:00:00.000 |            3 | Amritansh Raghav       | 789 28th Street | Memphis     | TN                    |                  99999 | USA                   |             10 |       0 | Check          | 2006-03-10 00:00:00.000 |         |          0 |                 |           3 |                                        1 |                             -1 |
|   39 |             3 |             8 | 2006-03-22 00:00:00.000 | 2006-03-24 00:00:00.000 |            3 | Elizabeth Andersen     | 123 8th Street  | Portland    | OR                    |                  99999 | USA                   |              5 |       0 | Check          | 2006-03-22 00:00:00.000 |         |          0 |                 |           3 |                                        2 |                             -2 |


Table: orders_status
|   id | status_name   |
|-----:|:--------------|
|    0 | New           |
|    1 | Invoiced      |
|    2 | Shipped       |
|    3 | Closed        |


Table: orders_tax_status
|   id | tax_status_name   |
|-----:|:------------------|
|    0 | Tax Exempt        |
|    1 | Taxable           |


Table: order_details
|   id |   order_id |   product_id |   quantity |   unit_price |   discount |   status_id | date_allocated   | purchase_order_id   |   inventory_id |   precio_total |
|-----:|-----------:|-------------:|-----------:|-------------:|-----------:|------------:|:-----------------|:--------------------|---------------:|---------------:|
|   27 |         30 |           34 |        100 |        14    |          0 |           2 |                  | 96                  |             83 |         1400   |
|   28 |         30 |           80 |         30 |         3.5  |          0 |           2 |                  |                     |             63 |          105   |
|   29 |         31 |            7 |         10 |        30    |          0 |           2 |                  |                     |             64 |          300   |
|   30 |         31 |           51 |         10 |        53    |          0 |           2 |                  |                     |             65 |          530   |
|   31 |         31 |           80 |         10 |         3.5  |          0 |           2 |                  |                     |             66 |           35   |
|   32 |         32 |            1 |         15 |        18    |          0 |           2 |                  |                     |             67 |          270   |
|   33 |         32 |           43 |         20 |        46    |          0 |           2 |                  |                     |             68 |          920   |
|   34 |         33 |           19 |         30 |         9.2  |          0 |           2 |                  | 97                  |             81 |          276   |
|   35 |         34 |           19 |         20 |         9.2  |          0 |           2 |                  |                     |             69 |          184   |
|   36 |         35 |           48 |         10 |        12.75 |          0 |           2 |                  |                     |             70 |          127.5 |


Table: order_details_status
|   id | status_name   |
|-----:|:--------------|
|    0 | None          |
|    1 | Allocated     |
|    2 | Invoiced      |
|    3 | Shipped       |
|    4 | On Order      |
|    5 | No Stock      |


Table: privileges
|   id | privilege_name     |
|-----:|:-------------------|
|    2 | Purchase Approvals |


Table: products
| supplier_ids   |   id | product_code   | product_name                             | description   |   standard_cost |   list_price |   reorder_level |   target_level | quantity_per_unit    | discontinued   |   stock | category                  |
|:---------------|-----:|:---------------|:-----------------------------------------|:--------------|----------------:|-------------:|----------------:|---------------:|:---------------------|:---------------|--------:|:--------------------------|
| 4              |    1 | NWTB-1         | Northwind Traders Chai                   |               |         13.5    |        18    |              10 |             40 | 10 boxes x 20 bags   | False          |      10 | Beverages                 |
| 10             |    3 | NWTCO-3        | Northwind Traders Syrup                  |               |          7.5    |        10    |              25 |            100 | 12 - 550 ml bottles  | False          |      25 | Condiments                |
| 10             |    4 | NWTCO-4        | Northwind Traders Cajun Seasoning        |               |         16.5    |        22    |              10 |             40 | 48 - 6 oz jars       | False          |      10 | Condiments                |
| 10             |    5 | NWTO-5         | Northwind Traders Olive Oil              |               |         16.0125 |        21.35 |              10 |             40 | 36 boxes             | False          |      10 | Oil                       |
| 2;6            |    6 | NWTJP-6        | Northwind Traders Boysenberry Spread     |               |         18.75   |        25    |              25 |            100 | 12 - 8 oz jars       | False          |      25 | Jams, Preserves           |
| 2              |    7 | NWTDFN-7       | Northwind Traders Dried Pears            |               |         22.5    |        30    |              10 |             40 | 12 - 1 lb pkgs.      | False          |      10 | Dried Fruit & Nuts        |
| 8              |    8 | NWTS-8         | Northwind Traders Curry Sauce            |               |         30      |        40    |              10 |             40 | 12 - 12 oz jars      | False          |      10 | Sauces                    |
| 2;6            |   14 | NWTDFN-14      | Northwind Traders Walnuts                |               |         17.4375 |        23.25 |              10 |             40 | 40 - 100 g pkgs.     | False          |      10 | Dried Fruit & Nuts        |
| 6              |   17 | NWTCFV-17      | Northwind Traders Fruit Cocktail         |               |         29.25   |        39    |              10 |             40 | 15.25 OZ             | False          |      10 | Canned Fruit & Vegetables |
| 1              |   19 | NWTBGM-19      | Northwind Traders Chocolate Biscuits Mix |               |          6.9    |         9.2  |               5 |             20 | 10 boxes x 12 pieces | False          |       5 | Baked Goods & Mixes       |


Table: purchase_orders
|   id |   supplier_id |   created_by | submitted_date          | creation_date           |   status_id | expected_date   |   shipping_fee |   taxes | payment_date   |   payment_amount | payment_method   | notes                                 |   approved_by | approved_date           |   submitted_by |   Days_from_POcreation_to_approval | Cluster_id   |
|-----:|--------------:|-------------:|:------------------------|:------------------------|------------:|:----------------|---------------:|--------:|:---------------|-----------------:|:-----------------|:--------------------------------------|--------------:|:------------------------|---------------:|-----------------------------------:|:-------------|
|   90 |             1 |            2 | 2006-01-14 00:00:00.000 | 2006-01-22 00:00:00.000 |           2 |                 |              0 |       0 |                |                0 |                  |                                       |             2 | 2006-01-22 00:00:00.000 |              2 |                                  0 | Clúster2     |
|   91 |             3 |            2 | 2006-01-14 00:00:00.000 | 2006-01-22 00:00:00.000 |           2 |                 |              0 |       0 |                |                0 |                  |                                       |             2 | 2006-01-22 00:00:00.000 |              2 |                                  0 | Clúster2     |
|   92 |             2 |            2 | 2006-01-14 00:00:00.000 | 2006-01-22 00:00:00.000 |           2 |                 |              0 |       0 |                |                0 |                  |                                       |             2 | 2006-01-22 00:00:00.000 |              2 |                                  0 | Clúster2     |
|   93 |             5 |            2 | 2006-01-14 00:00:00.000 | 2006-01-22 00:00:00.000 |           2 |                 |              0 |       0 |                |                0 |                  |                                       |             2 | 2006-01-22 00:00:00.000 |              2 |                                  0 | Clúster2     |
|   94 |             6 |            2 | 2006-01-14 00:00:00.000 | 2006-01-22 00:00:00.000 |           2 |                 |              0 |       0 |                |                0 |                  |                                       |             2 | 2006-01-22 00:00:00.000 |              2 |                                  0 | Clúster2     |
|   95 |             4 |            2 | 2006-01-14 00:00:00.000 | 2006-01-22 00:00:00.000 |           2 |                 |              0 |       0 |                |                0 |                  |                                       |             2 | 2006-01-22 00:00:00.000 |              2 |                                  0 | Clúster2     |
|   96 |             1 |            5 | 2006-01-14 00:00:00.000 | 2006-01-22 00:00:00.000 |           2 |                 |              0 |       0 |                |                0 |                  | Purchase generated based on Order #30 |             2 | 2006-01-22 00:00:00.000 |              5 |                                  0 | Clúster2     |
|   97 |             2 |            7 | 2006-01-14 00:00:00.000 | 2006-01-22 00:00:00.000 |           2 |                 |              0 |       0 |                |                0 |                  | Purchase generated based on Order #33 |             2 | 2006-01-22 00:00:00.000 |              7 |                                  0 | Clúster2     |
|   98 |             2 |            4 | 2006-01-14 00:00:00.000 | 2006-01-22 00:00:00.000 |           2 |                 |              0 |       0 |                |                0 |                  | Purchase generated based on Order #36 |             2 | 2006-01-22 00:00:00.000 |              4 |                                  0 | Clúster2     |
|   99 |             1 |            3 | 2006-01-14 00:00:00.000 | 2006-01-22 00:00:00.000 |           2 |                 |              0 |       0 |                |                0 |                  | Purchase generated based on Order #38 |             2 | 2006-01-22 00:00:00.000 |              3 |                                  0 | Clúster2     |


Table: purchase_order_details
|   id |   purchase_order_id |   product_id |   quantity |   unit_cost | date_received           | posted_to_inventory   |   inventory_id |   Total_Cost |
|-----:|--------------------:|-------------:|-----------:|------------:|:------------------------|:----------------------|---------------:|-------------:|
|  238 |                  90 |            1 |         40 |          14 | 2006-01-22 00:00:00.000 | True                  |             59 |          560 |
|  239 |                  91 |            3 |        100 |           8 | 2006-01-22 00:00:00.000 | True                  |             54 |          800 |
|  240 |                  91 |            4 |         40 |          16 | 2006-01-22 00:00:00.000 | True                  |             55 |          640 |
|  241 |                  91 |            5 |         40 |          16 | 2006-01-22 00:00:00.000 | True                  |             56 |          640 |
|  242 |                  92 |            6 |        100 |          19 | 2006-01-22 00:00:00.000 | True                  |             40 |         1900 |
|  243 |                  92 |            7 |         40 |          22 | 2006-01-22 00:00:00.000 | True                  |             41 |          880 |
|  244 |                  92 |            8 |         40 |          30 | 2006-01-22 00:00:00.000 | True                  |             42 |         1200 |
|  245 |                  92 |           14 |         40 |          17 | 2006-01-22 00:00:00.000 | True                  |             43 |          680 |
|  246 |                  92 |           17 |         40 |          29 | 2006-01-22 00:00:00.000 | True                  |             44 |         1160 |
|  247 |                  92 |           19 |         20 |           7 | 2006-01-22 00:00:00.000 | True                  |             45 |          140 |


Table: purchase_order_status
|   id | status    |
|-----:|:----------|
|    0 | New       |
|    1 | Submitted |
|    2 | Approved  |
|    3 | Closed    |


Table: sales_reports
| group_by       | display        | title             | filter_row_source                                                                     | default   |
|:---------------|:---------------|:------------------|:--------------------------------------------------------------------------------------|:----------|
| Category       | Category       | Sales By Category | SELECT DISTINCT [Category] FROM [products] ORDER BY [Category];                       | False     |
| country_region | Country/Region | Sales By Country  | SELECT DISTINCT [country_region] FROM [customers Extended] ORDER BY [country_region]; | False     |
| Customer ID    | Customer       | Sales By Customer | SELECT DISTINCT [Company] FROM [customers Extended] ORDER BY [Company];               | False     |
| employee_id    | Employee       | Sales By Employee | SELECT DISTINCT [Employee Name] FROM [employees Extended] ORDER BY [Employee Name];   | False     |
| Product ID     | Product        | Sales by Product  | SELECT DISTINCT [Product Name] FROM [products] ORDER BY [Product Name];               | True      |


Table: shippers
|   id | company            | last_name   | first_name   | email_address   | job_title   | business_phone   | home_phone   | mobile_phone   | fax_number   | address        | city    | state_province   |   zip_postal_code | country_region   | web_page   | notes   |
|-----:|:-------------------|:------------|:-------------|:----------------|:------------|:-----------------|:-------------|:---------------|:-------------|:---------------|:--------|:-----------------|------------------:|:-----------------|:-----------|:--------|
|    1 | Shipping Company A |             |              |                 |             |                  |              |                |              | 123 Any Street | Memphis | TN               |             99999 | USA              |            |         |
|    2 | Shipping Company B |             |              |                 |             |                  |              |                |              | 123 Any Street | Memphis | TN               |             99999 | USA              |            |         |
|    3 | Shipping Company C |             |              |                 |             |                  |              |                |              | 123 Any Street | Memphis | TN               |             99999 | USA              |            |         |


Table: strings
|   string_id | string_data                                                                                                         |
|------------:|:--------------------------------------------------------------------------------------------------------------------|
|           2 | Northwind Traders                                                                                                   |
|           3 | Cannot remove posted inventory!                                                                                     |
|           4 | Back ordered product filled for Order #|                                                                            |
|           5 | Discounted price below cost!                                                                                        |
|           6 | Insufficient inventory.                                                                                             |
|           7 | Insufficient inventory. Do you want to create a purchase order?                                                     |
|           8 | Purchase orders were successfully created for | products                                                            |
|           9 | There are no products below their respective reorder levels                                                         |
|          10 | Must specify customer name!                                                                                         |
|          11 | Restocking will generate purchase orders for all products below desired inventory levels.  Do you want to continue? |


Table: suppliers
|   id | company    | last_name            | first_name   | email_address   | job_title            | business_phone   | home_phone   | mobile_phone   | fax_number   | address   | city   | state_province   | zip_postal_code   | country_region   | web_page   | notes   |
|-----:|:-----------|:---------------------|:-------------|:----------------|:---------------------|:-----------------|:-------------|:---------------|:-------------|:----------|:-------|:-----------------|:------------------|:-----------------|:-----------|:--------|
|    1 | Supplier A | Andersen             | Elizabeth A. |                 | Sales Manager        |                  |              |                |              |           |        |                  |                   |                  |            |         |
|    2 | Supplier B | Weiler               | Cornelia     |                 | Sales Manager        |                  |              |                |              |           |        |                  |                   |                  |            |         |
|    3 | Supplier C | Kelley               | Madeleine    |                 | Sales Representative |                  |              |                |              |           |        |                  |                   |                  |            |         |
|    4 | Supplier D | Sato                 | Naoki        |                 | Marketing Manager    |                  |              |                |              |           |        |                  |                   |                  |            |         |
|    5 | Supplier E | Hernandez-Echevarria | Amaya        |                 | Sales Manager        |                  |              |                |              |           |        |                  |                   |                  |            |         |
|    6 | Supplier F | Hayakawa             | Satomi       |                 | Marketing Assistant  |                  |              |                |              |           |        |                  |                   |                  |            |         |
|    7 | Supplier G | Glasson              | Stuart       |                 | Marketing Manager    |                  |              |                |              |           |        |                  |                   |                  |            |         |
|    8 | Supplier H | Dunton               | Bryn Paul    |                 | Sales Representative |                  |              |                |              |           |        |                  |                   |                  |            |         |
|    9 | Supplier I | Sandberg             | Mikael       |                 | Sales Manager        |                  |              |                |              |           |        |                  |                   |                  |            |         |
|   10 | Supplier J | Sousa                | Luis         |                 | Sales Manager        |                  |              |                |              |           |        |                  |                   |                  |            |         |

 


tables: name: customers
data: customers.csv
name: employees
data: employees.csv
name: employee_privileges
data: employee_privileges.csv
name: inactive_customers
data: inactive_customers.csv
name: inventory_transactions
data: inventory_transactions.csv
name: inventory_transaction_types
data: inventory_transaction_types.csv
name: invoices
data: invoices.csv
name: orders
data: orders.csv
name: orders_status
data: orders_status.csv
name: orders_tax_status
data: orders_tax_status.csv
name: order_details
data: order_details.csv
name: order_details_status
data: order_details_status.csv
name: privileges
data: privileges.csv
name: products
data: products.csv
name: purchase_orders
data: purchase_orders.csv
name: purchase_order_details
data: purchase_order_details.csv
name: purchase_order_status
data: purchase_order_status.csv
name: sales_reports
data: sales_reports.csv
name: shippers
data: shippers.csv
name: strings
data: strings.csv
name: suppliers
data: suppliers.csv
label: orders
customer_id
customers
id
employee_privileges
employee_id
employees
id
employee_privileges
privilege_id
privileges
id
orders
employee_id
employees
id
inventory_transactions
customer_order_id
orders
id
invoices
order_id
orders
id
order_details
order_id
orders
id
orders
status_id
orders_status
id
orders
tax_status_id
orders_tax_status
id
orders
shipper_id
shippers
id
purchase_orders
created_by
employees
id
inventory_transactions
transaction_type
inventory_transaction_types
id
inventory_transactions
product_id
products
id
order_details
status_id
order_details_status
id
order_details
product_id
products
id
purchase_orders
status_id
purchase_order_status
id
purchase_orders
supplier_id
suppliers
id
inactive_customers
company
customers
company
purchase_order_details
inventory_id
inventory_transactions
id
output: {
    "joins": [
        {
            "from_table": "orders",
            "from_column": "customer_id",
            "to_table": "customers",
            "to_column": "id"
        },
        {
            "from_table": "employee_privileges",
            "from_column": "employee_id",
            "to_table": "employees",
            "to_column": "id"
        },
        {
            "from_table": "employee_privileges",
            "from_column": "privilege_id",
            "to_table": "privileges",
            "to_column": "id"
        },
        {
            "from_table": "orders",
            "from_column": "employee_id",
            "to_table": "employees",
            "to_column": "id"
        },
        {
            "from_table": "inventory_transactions",
            "from_column": "customer_order_id",
            "to_table": "orders",
            "to_column": "id"
        },
        {
            "from_table": "invoices",
            "from_column": "order_id",
            "to_table": "orders",
            "to_column": "id"
        },
        {
            "from_table": "order_details",
            "from_column": "order_id",
            "to_table": "orders",
            "to_column": "id"
        },
        {
            "from_table": "orders",
            "from_column": "status_id",
            "to_table": "orders_status",
            "to_column": "id"
        },
        {
            "from_table": "orders",
            "from_column": "tax_status_id",
            "to_table": "orders_tax_status",
            "to_column": "id"
        },
        {
            "from_table": "orders",
            "from_column": "shipper_id",
            "to_table": "shippers",
            "to_column": "id"
        },
        {
            "from_table": "purchase_orders",
            "from_column": "created_by",
            "to_table": "employees",
            "to_column": "id"
        },
        {
            "from_table": "inventory_transactions",
            "from_column": "transaction_type",
            "to_table": "inventory_transaction_types",
            "to_column": "id"
        },
        {
            "from_table": "inventory_transactions",
            "from_column": "product_id",
            "to_table": "products",
            "to_column": "id"
        },
        {
            "from_table": "order_details",
            "from_column": "status_id",
            "to_table": "order_details_status",
            "to_column": "id"
        },
        {
            "from_table": "order_details",
            "from_column": "product_id",
            "to_table": "products",
            "to_column": "id"
        },
        {
            "from_table": "purchase_orders",
            "from_column": "status_id",
            "to_table": "purchase_order_status",
            "to_column": "id"
        },
        {
            "from_table": "purchase_orders",
            "from_column": "supplier_id",
            "to_table": "suppliers",
            "to_column": "id"
        },
        {
            "from_table": "inactive_customers",
            "from_column": "company",
            "to_table": "customers",
            "to_column": "company"
        },
        {
            "from_table": "purchase_order_details",
            "from_column": "inventory_id",
            "to_table": "inventory_transactions",
            "to_column": "id"
        }
    ]
}