Top Tweets for #30DaySQLChallenge
π Day 20 of my #30DaySQLChallenge β LEAD & LAG π
Todayβs focus is on two powerful SQL window functions that help us look backward and forward in our data:
πΉ LAG() β pulls values from the previous row
πΉ LEAD() β pulls values from the next row

and combining datasets correctly are fundamental skills for building reliable databases.
This challenge is already more than just practice β itβs reshaping how I think about data.
#SQL #DataAnalytics #LearningInPublic #30DaySQLChallenge #AdventureWorks

Day 15 of my #30DaySQLChallenge π§βπ»
Was on Partitioning in SQl. It is a database optimization technique that allows you to divide a large table into smaller manageable sub-tables, while still being treated as a single table in queries. It improves performance on large datasets.π

Day 14 of my #30DaySQLChallengeπ
Today I explored Indexing in SQL.
Indexes improves the speed of data retrieval from tables. Just like how an index in a book helps you find topics faster
Instead of scanning the entire table, the DB uses the index to jump straight to the data.

Day 13 of my #30daySQLchallenge π. I learnt about data integrity and constraints. Learned how PRIMARY KEY ensures unique records,no NULL values,FOREIGN KEY links tables, and NOT NULL keeps data complete. In the query below. I created a table that enforces these constraintsπ§βπ» .

Day 12 of my #30daySQLchallenge π§βπ»π . I learnt about window functions today.Unlike GROUP BY, window functions allow you to calculate values across rows while still keeping each row visible. Thread π

Day 10 of my #30DaySQLChallenge
Today I explored SQL Transactions. commands that ensures data integrity in SQL. I learnt about COMMIT,ROLLBACK,SAVEPOINT. Also realised that my SQL workbench was on auto commit. Disabled that with a simple query
SET AUTOCOMMIT= O #Datafam ππ

Day 4-5 of my #30DaySQLChallenge:
Iβve made some great progress over the last two days, building on my SQL skills!
Day 4:
I focused on the basics of SELECT and FROM:
SELECT: Lets you choose specific columns or data points from your database.
π Day 17 of the #30DaySQLChallenge completed! π
Today's challenge was all about mastering queries.
πͺπ»
Excited for what's to come in the next 13 days! #SQL #Data #ChallengeAccepted

Day 30 (The End) π₯°
I selected the employees' first name, last name, department, and salary.
I used the DENSE RANK function to rank each employee's salary in descending order and PARTITION BY the department.
#30daysqlchallenge #techavilly #SQL #mysql

Day 29
I selected the job title and department.
I added a subquery in the WHERE clause to filter the result to only the job title and department with the highest Salary.
- The manager title in the HR department has the highest salary
#30daysqlchallenge #techavilly #mysql

Day 29
I selected the job title and department.
I added a subquery in the WHERE clause to filter the result to only the job title and department with the highest Salary.
- The manager title in the HR department has the highest salary
#30daysqlchallenge #techavilly #mysql

Bonus Question
I used two methods
1. The Limit and Offset method: used OFFSET to skip the first two sales and LIMIT it to one output
2. The Window function and Subquery: I used subquery to find sales and the ROW_NUMBER of each sale then selected the sales where the row_num is 3


Day 23
I selected the state, and used the DATEDIFF to calculate the number of days between the order date and the ship date.
I then found the average number of days it takes to deliver to each state.
#30daysqlchallenge #techavilly #mysql

Day 23
I selected the state, and used the DATEDIFF to calculate the number of days between the order date and the ship date.
I then found the average number of days it takes to deliver to each state.
#30daysqlchallenge #techavilly #mysql

Day 23
This question is on the stock market. I first calculated the daily changes in open and closed share prices.
Then I used the MIN and MAX functions to get the highest_daily decrease and highest daily increase.
#30daysqlchallenge #techavilly #mysql

Day 23
This question is on the stock market. I first calculated the daily changes in open and closed share prices.
Then I used the MIN and MAX functions to get the highest_daily decrease and highest daily increase.
#30daysqlchallenge #techavilly #mysql

Day 22
I selected the first name, last name, and salary columns.
I used the window function to calculate the company's average salary and then find the difference between each employee's salary and the company's average salary.
#30daysqlchallenge #techavilly #mysql

Day 22
I selected the first name, last name, and salary columns.
I used the window function to calculate the company's average salary and then find the difference between each employee's salary and the company's average salary.
#30daysqlchallenge #techavilly #mysql


Day 18
The duration is in weeks, so I divided by 52 to convert to years. I then used the AVG function to find the average years of customers' employment.
I filtered it to show the result for only customers in management positions.
#30daysqlchallenge #techavilly #mysql

Day 18
The duration is in weeks, so I divided by 52 to convert to years. I then used the AVG function to find the average years of customers' employment.
I filtered it to show the result for only customers in management positions.
#30daysqlchallenge #techavilly #mysql

#30DaySqlChallenge by @Techavilly
Hello datafam, here is for Thursday, 26-10
Day 14.
1. The task is to show the average duration of time that a customer with a management position worked.

#30DaySqlChallenge by @techavilly
Hello datafam, here is for Wednesday, 25-10
Day 13.
1. The task was to show the education qualification that gets the management position the most in the dataset.

#30DaySqlChallenge by @Techavilly
Hey datafam,
Here is my submission for Monday 23-10
Day 11
1. The task is to show the query that shows the percentage of customers that are divorced and have a balance greater than 2000.
2. I importing the CSV in to the created table.

#30DaySqlChallenge by @techavilly
Hey datafam,
Here is my submission for Friday 20-10
Day 10
1. The task was to get the segment that has most sales, total sales and the profit margin for each of them.
2. I selected all to view the column name properly,

Last Seen Hashtags on Sotwe
ladyboy_Bahrain
Seen from United Kingdom
monkeyapp
Seen from Jordan
chubbybigtits
Seen from Indonesia
Fnfgenderswap
Seen from United States
MysticThrone
Seen from Spain
omegle nolimit
Seen from United States
momson() +filter:native_video
Outoftheworld
Seen from Thailand
ΰΈΰΈ²ΰΈ’ΰΉΰΈΰΉΰΈΰΈ±ΰΈΰΈ§ΰΉΰΈ²ΰΈ§
Seen from Thailand
elazigtravesti
Seen from Turkey
Trends for you
Most Popular Users

Elon Musk 
@elonmusk
240.9M followers

Barack Obama 
@barackobama
119.2M followers

Donald J. Trump 
@realdonaldtrump
111.8M followers

Cristiano Ronaldo 
@cristiano
111.6M followers

Narendra Modi 
@narendramodi
107.1M followers

Rihanna 
@rihanna
97.9M followers

NASA 
@nasa
92.2M followers

Justin Bieber 
@justinbieber
91.1M followers

KATY PERRY 
@katyperry
88.2M followers

Taylor Swift 
@taylorswift13
82.1M followers

Lady Gaga 
@ladygaga
73.6M followers

Virat Kohli 
@imvkohli
70.7M followers

Kim Kardashian 
@kimkardashian
70M followers

YouTube 
@youtube
68.7M followers

Bill Gates 
@billgates
64.2M followers

Neymar Jr 
@neymarjr
63.6M followers

The Ellen Show
@theellenshow
62.4M followers

CNN 
@cnn
61.8M followers

Selena Gomez 
@selenagomez
61.3M followers

X 
@x
60.8M followers

























