From 305fc1b66632187a9b9f172ecf3b6b2cf934340a Mon Sep 17 00:00:00 2001 From: Rishabh Srivastava Date: Fri, 18 Aug 2023 18:12:16 +0800 Subject: [PATCH] Add sample metadata.txt --- metadata.txt | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 metadata.txt diff --git a/metadata.txt b/metadata.txt new file mode 100644 index 0000000..c181782 --- /dev/null +++ b/metadata.txt @@ -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