0% found this document useful (0 votes)
19 views24 pages

Instagram User Analytics

Uploaded by

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

Instagram User Analytics

Uploaded by

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

Instagram User

Analytics
Prepared by
Uzma Saiyed
Project Description
The Project is about finding out the various insights in Instagram
User database. We analyse this data on the following points:
Marketing
1. Loyal User Reward
2. Inactive User Engagement
3. Contest Winner Declaration
4. Hashtag Research
5. Launch AD Campaign
Investor Metrics
1. User Engagement
2. Bots & Fake Accounts

Software used MySQL Workbench 8.0 CE


Marketing
Loyal User Reward : People who have been using the platform for
the longest time.

Task1:
Find the 5 oldest users of the Instagram from the database provided. • We
will use select statement to select username and created_at column from
users table. • We will use order by clause with asc in created_at column to
sort the output in ascending order. • Using limit function, we can display the
output for top 5 oldest users of the Instagram.

QUERY:-
select username, created_at from users order by created_at asc limit 5;
Task1:
Find the 5 oldest users of the Instagram from the database
provided.

Result:-
select username, created_at from users order by created_at asc limit
5;
Marketing
Inactive User Engagement: The team wants to encourage inactive
users to start posting by sending them promotional emails.
Task 2:
Identify users who have never posted a single photo on Instagram. • We will
use select statement to select username and user id column from users table
then assign alias for users table as u and photos table as p • we will left join
photos table on users table to retrieve photo id column from photos table on
u.id= p.user_id because both columns have common content. • Using where
clause we will filter rows from users table where p.id is null. • We will use order
by clause in id column in users table to sort the output.
Query :
select u.username, u.id from users u left join photos p on u.id= p.user_id where p.id is null
order by u.id;
Task 2:
Identify users who have never posted a
single photo on Instagram.

Query :
select u.username, u.id from users u left join
photos p on u.id= p.user_id
where p.id is null order by u.id;

Result:
Marketing
Contest Winner Declaration: The team has organized a contest
where the user with the most likes on a single photo wins.

Task 3: Determine the winner of the contest and provide their


details to the team. We will use select statement to select id,
username column from users table, photo_id column from Likes table,
image_url column from photos table. Then we will use count function
in Likes table to count the likes and assign alias as no_of_likes. we will
do inner join photos table on Likes table on l.photo_id = p.id , Users
table on photos table on p.user_id = u.id and assign alias for likes
table as l , photos table as p , users table as u. We will use group by
clause in photo_id column from likes table to get number of likes for
We will use order by clause with desc in no_of_likes column to sort the
output in descending order. • Using limit function, we can display the
output of user with the most likes on single photo on Instagram.

Query :
select u.id, u.username, l.photo_id, p.image_url, count(*) as
no_of_likes from likes l inner join photos p on l.photo_id = p.id

inner join users u on p.user_id = u.id group by l.photo_id


order by no_of_likes desc limit 1;
Task 3:
Determine the winner of the contest and provide their details to the
team.

Result:

So Zack_Kemmer93 with user id 52 is the winner because he has


most number of likes i.e 48 on his single photo with photo_id 145.
Marketing
Hashtag Research: A partner brand wants to know the most
popular hashtags to use in their posts to reach the most
people.
Task 4:
Identify and suggest the top five most commonly used hashtags on the
platform. • We will use select statement to select tag_name column from Tags
table and use count function to count the number of times tags used then
assign alias for Tags table as t and photo_tags table as pt • we will left join
tags table on photo_tags table on pt.tag_id= t.id because both columns have
common content. • Using group by clause we will get number of times tags
used for each tag_id. • We will use order by clause with desc in
no_of_times_used column to sort the output in descending order. • Using limit
we will get top five most commonly used hashtags.
Marketing
Task 4:
Identify and suggest the top five most commonly used
hashtags on the platform.
Query :
select t.tag_name, count(*) as no_of_times_used from
photo_tags pt left join tags t on pt.tag_id= t.id group by
pt.tag_id order by no_of_times_used desc limit 5;
Marketing
Task 4:
Identify and suggest the top five most commonly used
hashtags on the platform.
Result:
Marketing
Ad Campaign Launch: The team wants to know the best
day of the week to launch ads.
Task 5:
Determine the day of the week when most users register on
Instagram. Provide insights on when to schedule an ad campaign. •
We will create columns for desired output using select
dayname(created_at) as day_of_week and count(*) as
no_of_users_registered from users table. • Using group by clause in
day_of_week column to get number of users registered in each day of
the week. • Then We will use order by clause with desc in
no_of_users_registered column to sort the output in descending order.
Marketing
Task 5:
Determine the day of the week when most users register on
Instagram.

Query :
select dayname(created_at) as day_of_week,
count(*) as no_of_users_registered from users group
by day_of_week order by no_of_users_registered
desc;
Marketing
Task 5:
Determine the day of the week when most users register on
Instagram.
Result :
Investor Metrics
User Engagement: Investors want to know if users are still
active and posting on Instagram or if they are making fewer
posts.

Task 1: Calculate the average number of posts per user on


Instagram. Also, provide the total number of photos on Instagram
divided by the total number of users. We will use select statement and
count function to count as total and to count distinct user_id from
photos table and divide them then we will get
Avg_num_of_post_per_user. We will use select statement for subquery
and count function as total from photos table and as total from users
table and divide them. Then we will get the total number of photos on
Instagram divided by the total number of users.
Investor Metrics
Task 1: Calculate the average number of posts per user on
Instagram. Also, provide the total number of photos on
Instagram divided by the total number of users.

Query:
select count(*)/count(distinct user_id) as
Avg_num_of_post_per_user from photos;
Investor Metrics
Task 1: Calculate the average number of posts per user on
Instagram. Also, provide the total number of photos on
Instagram divided by the total number of users.

Result:

There are total 257 photos and total 74 distinct user in photo table which gives desired
output 257/74 =3.47. Average number of posts per user is 3.
Investor Metrics
Task 1: Calculate the average number of posts per user on
Instagram. Also, provide the total number of photos on Instagram
divided by the total number of users.
QUERY:-
select ((select count(*) from photos)/ (select count(*) from users)) as
total_no_of_photos_divide_total_no_of_users;
Result:
There are total 257 photos in
photos table and 100 user in

users table which gives desired output is 257/100 =2.57


Investor Metrics
Bots & Fake Accounts: Investors want to know if the
platform is crowded with fake and dummy accounts.

Task 2: Identify users (potential bots) who have liked every single
photo on the site, as this is not typically possible for a normal user. We
will use select statement to select user_id from Likes table and
username from users table.
We will use count function in distinct photo_id from Likes table and
assign alias for Likes table as l and users table u. Then we will left join
Users table on Likes table. Using group by clause we will get output
for each user. Then we will use having function to search values
count(*) from photos equal values to
total_no_of_photos_liked.
Investor Metrics
Task 2: Identify users (potential bots) who have liked every single
photo on the site, as this is not typically possible for a normal user.

Query :
select l.user_id, u.username, count(distinct l.photo_id) as
total_no_of_photos_liked from likes l left join users u
on l.user_id = u.id group by l.user_id
having total_no_of_photos_liked = (select count(*) from
photos)
Investor Metrics
Task 2: Identify users (potential bots)
who have liked every single photo on
the site, as this is not typically possible
for a normal user.

Result :
There are 30 users who have liked every single
photo on the site. They can be identified as bots
Or fake accounts.
Thanks!

Prepared By Uzma Saiyed

You might also like