0% found this document useful (0 votes)
21 views14 pages

In Stag Ram Analytics Project

The project report outlines an analysis of Instagram user data aimed at providing insights for the product team to inform future app development. Key tasks include identifying loyal and inactive users, determining contest winners, researching popular hashtags, and analyzing user engagement metrics using SQL queries. The findings are intended to support marketing strategies and improve user engagement on the platform.

Uploaded by

jobs.apurva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views14 pages

In Stag Ram Analytics Project

The project report outlines an analysis of Instagram user data aimed at providing insights for the product team to inform future app development. Key tasks include identifying loyal and inactive users, determining contest winners, researching popular hashtags, and analyzing user engagement metrics using SQL queries. The findings are intended to support marketing strategies and improve user engagement on the platform.

Uploaded by

jobs.apurva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Project Report: Analyzing Instagram

User Data
Overview:
The goal is to extract meaningful insights from the data to provide valuable information that can help
the product team at Instagram make informed decisions about the future direction of the app. By
analyzing user behavior, such as posting patterns, engagement levels, and popular hashtags, the project
seeks to support various teams within the business, such as marketing, product development, and
investor relations. Ultimately, the project aims to leverage SQL skills to derive insights that can
potentially influence the growth and development of one of the world's most popular social media
platforms, Instagram.

Approach:
To complete the project successfully, my approach involves the following steps:

1. Understanding the Data: Get familiar with the database schema and the tables containing
Instagram user data. Understand the relationships between different tables to effectively
extract insights.

2. Analyzing Requirements: Review the specific tasks outlined in the project, such as identifying
loyal users, inactive users, contest winners, popular hashtags, user engagement metrics, and
potential bot accounts.

3. Writing SQL Queries: Craft SQL queries to extract relevant data for each task, ensuring accuracy
and efficiency in querying the database.

4. Data Manipulation: Use SQL functions and operators to manipulate the data as needed to
derive the required insights.

5. Data Visualization: If necessary, visualize the extracted data using tools like MySQL Workbench
to enhance the presentation of insights.

6. Documentation: Document the SQL queries used, the outputs generated, and the insights
derived for each task in a clear and concise manner.

7. Report Preparation: Compiling the findings into a comprehensive report that includes the SQL
queries, outputs, and insights. Present the report in a format suitable for sharing with the
product team and leadership.
Tech-Stack Used:
1.MySQL Workbench

2.MS Word 365

SQL TASKS
A) Marketing Analysis:
1. Loyal User Reward:
o SQL Query:

Query:
/*We want to reward our users who have been around the longest.
Find the 5 oldest users.*/

SELECT * FROM users

ORDER BY created_at

LIMIT 5;

Output:

id username created_at
80 Darby_Herzog 5/6/2016 0:14
67 Emilio_Bernier52 5/6/2016 13:04
63 Elenor88 5/8/2016 1:30
95 Nicole71 5/9/2016 17:30
38 Jordyn.Jacobson2 5/14/2016 7:56

Insights:
According to the SQL Query above the five oldest/most loyal customers names have
been found and this detail should be provided to Marketing team so that they can
reward them accordingly to encourage them for using the platform for so long.

2. Inactive User Engagement:

o SQL Query:
Query :
/*We want to target our inactive users with an email campaign.

Find the users who have never posted a photo*/

SELECT username

FROM users

LEFT JOIN photos ON users.id = photos.user_id

WHERE photos.id IS NULL;

o Output:
username
Aniya Hackett
Bartholome. Bernhard
Bethany20
Darby Herzog
David.Osinski47
Duane60
Esmeralda.Mraz57
Esther.Zulauf61
Franco_Keebler64
Hulda Macejkovic
Jaclyn81
Janelle.Nikolaus81
Jessyca_West
Julien_Schmidt
Kasandra_Homenick
Leslie67
Linnea59
Maxwell.Halvorson
Mckenna17
Mike.Auer39
Morgan.Kassulke
Nia_Haag
Ollie_Ledner37
Pearl7
Rocio33
Tierra.Trantow
username
Aniya_Hackett
Bartholome.Bernhard
Bethany20
Darby_Herzog
David.Osinski47
Duane60
Esmeralda.Mraz57
Esther.Zulauf61
Franco_Keebler64
Hulda.Macejkovic
Jaclyn81
Janelle.Nikolaus81
Jessyca_West
Julien_Schmidt
Kasandra_Homenick
Leslie67
Linnea59
Maxwell.Halvorson
Mckenna17
Mike.Auer39
Morgan.Kassulke
Nia_Haag
Ollie_Ledner37
Pearl7
Rocio33
Tierra.Trantow

Insights:
As we can see we have found 26 inactive users who have never posted anything .So this
information can be given to the marketing department so that they can target them with an
email campaign and try to get them to actively participate on the platform by posting photos
and spending more time on instagram to increase the usage.

3. Contest Winner Declaration:


o SQL Query:
o

o Query
/*We're running a new contest to see who can get the most likes on a single photo.

WHO WON??!!*/

SELECT

username,

photos.id,

photos.image_url,

COUNT(*) AS total

FROM photos

INNER JOIN likes

ON likes.photo_id = photos.id

INNER JOIN users

ON photos.user_id = users.id

GROUP BY photos.id

ORDER BY total DESC

LIMIT 1;

Output:

username id image URL total


Zack_Kemmer93 145 https://jarret.name 48

Insights:
Congratulations to Zack Kemmer who has become the contest winner of being the person who has
gotten maximum likes on a photo that is 48 times. She should be handsomely awarded and promoted by
the marketing team to get more traffic on the platform and encourage people to post more photos.

4. Hashtag Research:
o SQL Query:

Query :
/*A brand wants to know which hashtags to use in a post

What are the top 5 most commonly used hashtags?*/

SELECT tag_name, COUNT(tag_name) AS total

FROM tags

JOIN photo_tags ON tags.id = photo_tags.tag_id


GROUP BY tags.id

ORDER BY total DESC;

o Output:

tag name total


smile 59
beach 42
party 39
fun 38
concert 24

Insights:
The 5 most popular hashtags with their total is smile,beach,party,fun,concert. These
hashtags should be used by the investers to increase the reach of their posts.

5. Ad Campaign Launch:
o SQL Query:
Query:
/*What day of the week do most users register on?

We need to figure out when to schedule an ad campgain*/

SELECT date_format(created_at,'%W') AS 'day of the week', COUNT(*) AS 'total


registration'

FROM users

GROUP BY 1

ORDER BY 2 DESC;

o Output:
day of the
week total registration
Thursday 16
Sunday 16
Friday 15
Tuesday 14
Monday 14
Wednesday 13
Saturday 12

Insights:
As evident from above the maximum registrations happen on Thursday and Sunday . So
marketing team should launch the campaign on either Thursday or on a Sunday.

B) Investor Metrics:
1. User Engagement:

o SQL Query:
Query:
/*Total Posts by users */

SELECT SUM(user_posts.total_posts_per_user)

FROM (SELECT users.username,COUNT(photos.image_url) AS total_posts_per_user

FROM users

JOIN photos ON users.id = photos.user_id

GROUP BY users.id) AS user_posts;

/*total numbers of users who have posted at least one time */

SELECT COUNT(DISTINCT(users.id)) AS total_number_of_users_with_posts

FROM users

JOIN photos ON users.id = photos.user_id;

/*Our Investors want to know...


How many times does the average user post?*/

/*total number of photos/total number of users*/

SELECT ROUND((SELECT COUNT(*)FROM photos)/(SELECT COUNT(*) FROM users),2);

Output:

ROUND((SELECT
COUNT(*)FROM
photos)/(SELECT COUNT(*)
AS avg_post
FROM users),2)
2.57

Insights:
As we can see from above query the average post from users is 2 .

Total no of photos are 257.

Total no of users who have posted atleast once is 74.

Bots & Fake Accounts:

o SQL Query:
Query:
/*We have a small problem with bots on our site...

Find users who have liked every single photo on the site*/

SELECT users.id,username, COUNT(users.id) As total_likes_by_user

FROM users

JOIN likes ON users.id = likes.user_id

GROUP BY users.id

HAVING total_likes_by_user = (SELECT COUNT(*) FROM photos);

o Output:

id username total_likes_by_user
5 Aniya_Hackett 257
14 Jaclyn81 257
21 Rocio33 257
24 Maxwell.Halvorson 257
36 Ollie_Ledner37 257
41 Mckenna17 257
54 Duane60 257
57 Julien_Schmidt 257
66 Mike.Auer39 257
71 Nia_Haag 257
75 Leslie67 257
76 Janelle.Nikolaus81 257
91 Bethany20 257

Insights:
As we can see we have found 13 bots on the platform who have liked all 257 photos ,so
these bots should be flagges to maintain authenticity.

Results & Insights:

With the User Instagram analytics project , I have learnt how


to do data analysis as a business or data analyst on real time
data to help the company managers in taking data driven
decisions
As this dataset had less rows and columns it really helped
in understanding the database properly and extracting useful
insights for the marketing department and the investors.
This project really helped me understand the basics of
analysis process and was a very good learning experience.

You might also like