Skip to content

This is a collection of all the queries i ran in an attempt to learn SQL

Notifications You must be signed in to change notification settings

dhiman-A/Portfolio_project_2--Parch_and_posey-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In this project I have utilised the data from Parch and Posey, a fictitious company that sells paper.

They have 50 sales representatives spread across the United States in four regions. They sell three types of paper: regular, poster, and glossy. Their clients are primarily Fortune 100 companies whom they attract by advertising on Google, Facebook, and Twitter.

Using SQL I have tried to help Parch and Posey answer tricky questions like which of their products is worst performing, and which of their marketing channels they should make a greater investment in.

The entity relation diagram for Parch and Posey: shows how data is structured in a database.

alt text

The database consists of five tables:

  • Web_events 9073 rows and 4 columns

  • Sales_reps 50 rows and 3 columns

  • Region 4 rows and 3 columns

  • Orders 6912 rows and 11 columns

  • Accounts 350 rows and 7 columns

My learnings include the following commands in SQL

Basic SQL – SELECT, FROM, LIMIT, ORDER BY, WHERE, LIKE, IN, NOT, AND, OR, BETWEEN

Primary key, Foreign key, ALIAS, JOINS - LEFT, RIGHT, UNION, UNION ALL, CROSS, SELF

Aggregators - COUNT, SUM, AVG, MIN, MAX,DISTINCT, DATE_TRUNC, DATE_PART(dow) CASE - WHEN, THEN, ELSE, END AS

SQL Queries and CTE(Common Table Expressions) - WITH

About

This is a collection of all the queries i ran in an attempt to learn SQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published