-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample_inserts.sql
More file actions
52 lines (44 loc) · 1.48 KB
/
sample_inserts.sql
File metadata and controls
52 lines (44 loc) · 1.48 KB
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
43
44
45
46
47
48
49
50
51
52
-- INSERT USERS (5 sample users)
INSERT INTO users (username, email, full_name, bio)
VALUES
('alex99', 'alex99@example.com', 'Alex Mathews', 'Tech analyst'),
('riya_s', 'riyas@example.com', 'Riya S', 'Fitness + Travel'),
('vinod_k', 'vinodk@example.com', 'Vinod K', 'Automobile Enthusiast'),
('lisa_m', 'lisam@example.com', 'Lisa M', 'Food blogger'),
('tom_r', 'tomr@example.com', 'Tom R', 'Gamer & Streamer');
---------------------------------------------------------
-- INSERT POSTS (one per user)
INSERT INTO posts (user_id, content, image_url)
VALUES
(1, 'Started exploring SQL deeply today.', NULL),
(2, 'Workout done! Feeling pumped 💪', NULL),
(3, 'New review video coming soon.', 'review.png'),
(4, 'Tried a new pasta recipe. Incredible!', 'pasta.jpg'),
(5, 'Streaming tonight at 8 PM!', NULL);
---------------------------------------------------------
-- INSERT LIKES
INSERT INTO likes (user_id, post_id)
VALUES
(2, 1), (3, 1),
(1, 2), (5, 2),
(1, 3),
(2, 4), (3, 4), (1, 4),
(4, 5), (3, 5);
---------------------------------------------------------
-- INSERT COMMENTS
INSERT INTO comments (post_id, user_id, comment_text)
VALUES
(1, 2, 'Good start! Keep going.'),
(2, 1, 'Bro your dedication is unreal.'),
(3, 5, 'Excited to watch it!'),
(4, 3, 'Send recipe pls.'),
(5, 4, 'Let’s gooo!');
---------------------------------------------------------
-- INSERT FOLLOW RELATIONSHIPS
INSERT INTO follows (follower_id, following_id)
VALUES
(1, 2), (1, 3),
(2, 1),
(3, 1), (3, 4),
(4, 5),
(5, 1);