▶️Practice Writing SQL Queries using Real
Dataset 💯
🧵
“The very first thing, we must do when writing #SQL queries, is to understand the underlying data. Once we understand the data and how this data is stored across different tables, it becomes much simpler to write SQL #Queries to retrieve any information from that data”
✅List of SQL Queries:
We shall write SQL #Queries using this data. For each of these queries, you would find the problem statement and then the screen shot of the expected output. Under each of these 20 problem statement
1- How many olympics games have been held? 2- List down all #Olympics games held so far. 3- Mention the total no of nations who participated in each olympics game? 4- Which year saw the highest and lowest no of countries participating in olympics?
5- Which nation has participated in all of the olympic games? 6- Identify the sport which was played in all summer olympics. 7- Which Sports were just played only once in the olympics? 8- Fetch the total no of sports played in each olympic games.
9- Fetch details of the oldest athletes to win a gold medal. 10- Find the Ratio of male and female athletes participated in all olympic games.
There are certain SQL concepts which you should be familiar with if you plan to attend an #SQL interview. No matter which RDBMS you use wether it is MySQL, Oracle, Microsoft SQL Server, #PostgreSQL or any other, these SQL concepts are common for all of the popular RDBMS.
Are you a wine enthusiast? If you are, then you’ve probably heard of Wine Magazine.
🔥Let us solve one of the Advanced SQL interview questions on RANK function.
🧵
❓ Question is taken from Wine Magazine that involves clauses like PARTITION BY, UNION ALL, CASE statements, and Window functions.
We will use a 3-step framework to solve the problem that can be used to solve any coding problem.
Find the cheapest and the most expensive variety in each region. Output the region along with the corresponding most expensive and the cheapest variety. Be aware that there are 2 region columns, the price from that row applies to both of them.
👨💻 10 different ways to remove duplicate records in SQL
🧵
1 - Delete using Unique Identifier.
2 - Using SELF join.
3 - Using Window function.
4 - Using MIN function. This delete even multiple duplicate records.
5 - Using backup table.
6 - Using backup table without dropping the original table.
7 - Delete using CTID.
8 - By creating a temporary unique id column.
6 Must have line charts for business data analysis 📈👌 💯
🧵
1. Indexed chart for comparing trend 2. #Sparkline for tiny insight 3. Spaghetti line #chart for bringing focus 4. Smoothed line chart for evening out edge 5. Forecast chart to predict future value based on trend & seasonality 6. Line chart combination when just a line won't do
▶ Line charts are similar to #scatterplots except that they connect the data points with lines. Choose a line chart when ordering and joining the #data points by their X-axis values highlights meaningful changes in the vertical Y-axis variable.