-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.sql
More file actions
46 lines (33 loc) · 738 Bytes
/
Copy pathschema.sql
File metadata and controls
46 lines (33 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
CREATE TABLE users (
user_id INT PRIMARY KEY,
join_date DATE,
country VARCHAR(50),
membership_tier VARCHAR(20)
);
CREATE TABLE products (
product_id INT PRIMARY KEY,
product_name VARCHAR(100),
category VARCHAR(50),
price DECIMAL(10, 2)
);
CREATE TABLE orders (
order_id INT PRIMARY KEY,
user_id INT,
order_date DATE,
total_amount DECIMAL(10, 2),
status VARCHAR(20)
);
CREATE TABLE order_items (
item_id INT PRIMARY KEY,
order_id INT,
product_id INT,
quantity INT,
price_per_unit DECIMAL(10, 2)
);
CREATE TABLE user_sessions (
session_id INT PRIMARY KEY,
user_id INT,
session_start TIMESTAMP,
session_end TIMESTAMP,
page_views INT
);