Skip to content

NikhilGarakapati/100daysofSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

100daysofSQL

  • The purpose of accepting this challenge is to dive deep in Querying concepts starting from basic SQL problem solving to performance tuning, query optimization etc.,

  • This repository would contain the Python way of solving the problems.


Day1

Problem statement:

Write a query that calculates the difference between the highest salaries found in the marketing and engineering departments. Output just the difference in salaries.

Data Structure: view here

Datasets: view here

Solution1: view here


Day2

Problem statement:

Find the date with the highest total energy consumption from the data centers. Output the date along with the total energy consumption across all data centers.

Data model: view here

Datasets view here

Solution: view here


Day3

Problem statement: Find the total number of downloads for paying and non-paying users by date. Include only records where non-paying customers have more downloads than paying customers. The output should be sorted by earliest date first and contain 3 columns date, non-paying downloads, paying downloads.

Datasets: view here

Solution: view here


Day4

Problem statement: Find the popularity percentage for each user on Facebook. The popularity percentage is defined as the total number of friends the user has divided by the total number of users on the platform, then converted into a percentage by multiplying by 100. Output each user along with their popularity percentage. Order records in ascending order by user id. The 'user1' and 'user2' column are pairs of friends.

Datasets: view here

Solution: view here


Day5

Problem statement: Write a query that'll identify returning active users. A returning active user is a user that has made a second purchase within 7 days of any other of their purchases. Output a list of user_ids of these returning active users.

Datasets: view here

Solution: view here

Day6

Problem statement: view here

Solution: view here

Day7

Exploring Booking.com dataset

view here

About

This repository will be used exclusively for solving SQL problems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages