Skip to content

Commit

Permalink
Add sample metadata.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv authored Aug 18, 2023
1 parent 2313019 commit 305fc1b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions metadata.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
CREATE TABLE products (
product_id INTEGER PRIMARY KEY,
name VARCHAR(50),
price DECIMAL(10,2),
quantity INTEGER
);

CREATE TABLE customers (
customer_id INTEGER PRIMARY KEY,
name VARCHAR(50),
address VARCHAR(100)
);

CREATE TABLE salespeople (
salesperson_id INTEGER PRIMARY KEY,
name VARCHAR(50),
region VARCHAR(50)
);

CREATE TABLE sales (
sale_id INTEGER PRIMARY KEY,
product_id INTEGER,
customer_id INTEGER,
salesperson_id INTEGER,
sale_date DATE,
quantity INTEGER
);

CREATE TABLE product_suppliers (
supplier_id INTEGER PRIMARY KEY,
product_id INTEGER,
supply_price DECIMAL(10,2)
);

===
Joinable table/column combinations:
- sales.product_id can be joined with products.product_id
- sales.customer_id can be joined with customers.customer_id
- sales.salesperson_id can be joined with salespeople.salesperson_id
- product_suppliers.product_id can be joined with products.product_id

0 comments on commit 305fc1b

Please sign in to comment.