-
Notifications
You must be signed in to change notification settings - Fork 0
/
LinkedinAppImpersonation.sql
63 lines (54 loc) · 2.59 KB
/
LinkedinAppImpersonation.sql
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
53
54
55
56
57
58
59
60
61
62
63
/*Using LinkedIn Posts data
to create SQL Statements*/
/*Creating a Linkedin database*/
CREATE DATABASE LinkedIn_Post_Groupfour;
/*Creating a table to store Linkedin posts data*/
CREATE TABLE Posts (
id INT PRIMARY KEY AUTO_INCREMENT,
username TEXT,
content TEXT,
post_date DATE,
likes INT,
comments INT
);
/*Insert values into the table*/
INSERT INTO Posts (username, content, post_date, likes, comments) VALUES ("Joyce Yayra Osafo", "Just completed the Associate Data Analyst certification on Data Camp","24-10-24", 200, 150);
INSERT INTO Posts (username, content, post_date, likes, comments) VALUES ("Joyce Yayra Osafo", "Stay motivated, the best is yet to come","24-09-24", 350, 250);
INSERT INTO Posts (username, content, post_date, likes, comments) VALUES ("Joyce Yayra Osafo", "Meet my mentors, they are the best","24-08-24", 400, 150);
INSERT INTO Posts (username, content, post_date, likes, comments) VALUES ("Joyce Yayra Osafo", "Excited to join the Big data US Team","24-07-24", 250, 90);
INSERT INTO Posts (username, content, post_date, likes, comments) VALUES ("Joyce Yayra Osafo", "Had an amazing time volunteering at the GDIW Event","24-06-24", 120, 100);
INSERT INTO Posts (username, content, post_date, likes, comments) VALUES ("Joyce Yayra Osafo", "Change and Innovation:My GDIW'24 Experience","24-05-24", 980, 300);
INSERT INTO Posts (username, content, post_date, likes, comments) VALUES ("Joyce Yayra Osafo", "I am now equipped to tackle complex challenges in Python","24-04-24", 500, 120);
INSERT INTO Posts (username, content, post_date, likes, comments) VALUES ("Joyce Yayra Osafo", "Just levelled up my data skills with 9 certifications from DataCamp","24-03-24", 700, 480);
INSERT INTO Posts (username, content, post_date, likes, comments) VALUES ("Joyce Yayra Osafo", "Just completed the Intermediate SQL certification on Data Camp","24-02-24", 190, 50);
INSERT INTO Posts (username, content, post_date, likes, comments) VALUES ("Joyce Yayra Osafo", "Just completed the Intermediate Power BI on Data Camp","24-01-24", 3900, 2000);
/*Viewing the LinkedIn_Post_Groupfour table*/
SELECT
*
FROM
Posts;
/*Updating two posts from the table*/
UPDATE Posts
SET
content = 'Just completed the AWS Cloud Certification on DataCamp'
WHERE
id = 10;
/*Update two*/
UPDATE Posts
SET
content = 'How i bought my new Tesla Model Y 2024'
WHERE
id = 9;
/*Deleting two posts from table*/
DELETE FROM Posts
WHERE
id = 5;
/*Second deletion*/
DELETE FROM Posts
WHERE
id = 4;
/*Viewing the final content of the LinkedIn_Post_Groupfourtable*/
SELECT
*
FROM
Posts;