Giter Site home page Giter Site logo

advanced-sql-mysql-data-analysis's Introduction

Database of the project

Analyzing the Traffic Source

KEY TABLES

PAID MARKETING CAMPAIGNS: UTM PARAMETERS

TRAFFIC SOURCE ANALYSIS PROBLEM

Solution:

select
	website_sessions.utm_content,
    count(distinct website_sessions.website_session_id) as sessions,
    count(distinct orders.order_id) as orders,
    sum(orders.price_usd) as revenue,
    count(distinct orders.order_id)/count(distinct website_sessions.website_session_id)
		as conversion_rate
from website_sessions
LEFT JOIN orders
on website_sessions.website_session_id=orders.website_session_id
where website_sessions.website_session_id between 1000 and 2000
group by
	1
order by
	2 desc;

ASSIGNMENT -1 : FINDING TOP TRAFFIC SOURCES

  • Show UTM source, campaign, refererring domain
  • get data only upto april 12, 2012.

AADSIGNMENT - 2: FINDING TRAFFIC CONVERSION RATES

  • calcularte the conversion rate from session to order

  • conditions are created before april 14, 2012, utm_source is gsearch and utm_campaign as nonbrand.

Solution:

select
	count(distinct website_sessions.website_session_id)
		as sessions,
	count(distinct orders.order_id)
		as orders,
    count(distinct orders.order_id) / count(distinct website_sessions.website_session_id)
		as session_to_order_conv_rates
from
	website_sessions left join orders
	on website_sessions.website_session_id=orders.website_session_id
where
	website_sessions.created_at<'2012-04-14'
    and utm_source='gsearch'
    and utm_campaign='nonbrand';

advanced-sql-mysql-data-analysis's People

Watchers

James Cloos avatar Jissmon Jose avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.