You are on page 1of 8

Project Description:

This project focuses on analyzing the Instagram database to provide


valuable insights for the marketing team and investors. By performing SQL
queries and analyses, we aim to address specific questions related to
marketing campaigns, user engagement, and the presence of suspicious
accounts. The project's objective is to assist the marketing team in making
informed decisions, evaluating the platform's performance, and ensuring its
authenticity.

Approach:
To achieve the project's goals, we utilized SQL queries to extract relevant
information from the Instagram database. Our approach involved executing
specific queries to answer each question posed by the marketing team and
investors. These queries involved joining tables, aggregating data, and
sorting results based on various criteria. By combining these techniques,
we derived meaningful insights and provided actionable recommendations.

Tech-Stack Used:
1. Database Management System: MySQL
2. SQL Query Language: We executed SQL queries to retrieve and analyze
data from the database.
3. Tools: We utilized MySQL Workbench (or a similar MySQL client) to
execute queries and interact with the database.

Insights:

A. Marketing

1. Oldest Users: We identified the five earliest users of Instagram,


showcasing their loyalty and long-term engagement since May 2016.

SQL Query:

SELECT username, created_at


FROM users
ORDER BY created_at
LIMIT 5;

Output:

username created_at

Darby_Herz 06 May 2016


og

Emilio_Bern 07 May 2016


ier52

Elenor88 08 May 2016

Nicole71 09 May 2016

Jordyn.Jaco 10 May 2016


bson2

2. Inactive Users: Users who have never posted a photo on Instagram


were identified. This information can help target them with promotional
efforts to encourage their participation.

SQL Query:

SELECT username
FROM users
WHERE id NOT IN (
SELECT DISTINCT user_id
FROM photos
);

Output:

username

Aniya_Hackett

Kasandra_Homenick

Jaclyn81

Rocio33

Maxwell.Halvorson

Tierra.Trantow

Pearl7

Ollie_Ledner37

Mckenna17

David.Osinski47

Morgan.Kassulke

Linnea59

Duane60

Julien_Schmidt

Mike.Auer39

Franco_Keebler64

Nia_Haag
Hulda.Macejkovic

Leslie67

Janelle.Nikolaus81

Darby_Herzog

Esther.Zulauf61

Bartholome.Bernhard

Jessyca_West

Esmeralda.Mraz57

Bethany20

3. Contest Winner: The winner of the contest was determined by


analyzing the number of likes received for each photo. Zack_Kemmer93
emerged as the winner with 48 likes on photo ID 145.

SQL Query:

SELECT u.username, p.id AS photo_id, COUNT(l.user_id) AS likes


FROM users AS u
JOIN photos AS p ON u.id = p.user_id
JOIN likes AS l ON p.id = l.photo_id
GROUP BY u.username, p.id
ORDER BY likes DESC
LIMIT 1;

Output:
username photo_id likes

Zack_Kem 145 48
mer93

4. Top Hashtags: By analyzing hashtag usage, we discovered the five


most commonly used hashtags on the platform. These insights can aid
partner brands in maximizing their reach and engagement.

SQL Query:

SELECT t.tag_name, COUNT(*) AS tag_count


FROM tags AS t
JOIN photo_tags AS pt ON t.id = pt.tag_id
GROUP BY t.tag_name
ORDER BY tag_count DESC
LIMIT 5;

Output:

tag_name tag_count

smile 59

beach 42

party 39

fun 38

concert 24
5. Best Day for AD Campaigns: By analyzing user registration data, we
found that Thursday had the highest number of user registrations. This
information can guide the marketing team in scheduling ad campaigns
effectively.

SQL Query:

SELECT DAYNAME(created_at) AS registration_day, COUNT(*) AS


registration_count
FROM users
GROUP BY registration_day
ORDER BY registration_count DESC
LIMIT 1;

Output:

registration_day registration_count

Thursday 16

6. User Engagement: We calculated the average number of posts per user


and the total number of photos on Instagram. On average, users post
approximately 2.57 times, indicating active engagement on the platform.

SQL Query:

SELECT COUNT(*) / (SELECT COUNT(*) FROM users) AS


average_posts_per_user
FROM photos;

SELECT COUNT(*) AS total_photos, (SELECT COUNT(*) FROM users)


AS total_users
FROM photos;
Output:

total_photos total_users

257 100

7. Suspicious Accounts: We identified potential suspicious accounts by


finding users who have liked every single photo on the site. This data can
help in investigating and addressing the presence of such accounts.

SQL Query:

SELECT u.username
FROM users AS u
JOIN likes AS l ON u.id = l.user_id
GROUP BY u.username
HAVING COUNT(DISTINCT l.photo_id) = (SELECT COUNT(*) FROM
photos);

Output:

username

Aniya_Hackett

Bethany20

Duane60

Jaclyn81

Janelle.Nikolaus81
Julien_Schmidt

Leslie67

Maxwell.Halvorson

Mckenna17

Mike.Auer39

Nia_Haag

Ollie_Ledner37

Rocio33

Result:
Through the analysis of the Instagram database, we gained valuable
insights into user behavior, engagement patterns, contest winners, popular
hashtags, and potential suspicious accounts. These insights can assist the
marketing team in developing effective marketing campaigns, improving
user engagement, and maintaining the authenticity of the platform. The
project provided actionable recommendations for targeted promotions, ad
campaign scheduling, and identifying potential suspicious accounts.

You might also like