But IN makes this much cleaner:
IN checks whether a value belongs to a specified list.
๐น 23. NOT IN
You can also exclude multiple values.
This returns customers whose city isn't Pune or Mumbai.
๐น 24. LIKE
LIKE is used for pattern matching.
Suppose we want names beginning with A.
Here:
% โ Any sequence of characters
So this could match:
Alice
Amit
Ananya
๐น 25. LIKE with %
Example:
This searches for names containing the sequence an.
The exact behavior can depend on database collation and case-sensitivity settings.
๐น 26. LIKE with _
The underscore _ generally represents exactly one character.
Example:
This could match:
A11
AB1
AX1
But not:
A123
A1
because _ represents one character.
๐น 27. NULL Values
One of the most important concepts in SQL filtering is NULL.
NULL generally means:
It does not mean:
Zero
Empty string
False
For example:
customer_id name phone
101 Alice 9999999999
102 Bob NULL
Bob's phone number is missing or unknown.
๐น 28. Checking for NULL
You should not normally write:
Instead, use:
To find records where the value exists:
This is extremely important in Data Analytics.
๐น 29. WHERE and NULL Logic
Suppose:
What happens when salary is NULL?
The condition isn't considered true.
The row won't be returned.
SQL uses three-valued logic involving:
TRUE
FALSE
UNKNOWN
This is one reason NULL handling requires special attention.
๐น 30. WHERE with SELECT
WHERE works together with SELECT.
Example:
The query:
1.
Retrieves selected columns
2.
From the customers table
3.
Keeps only rows satisfying the condition
๐น 31. WHERE in Real-World Data Science
Imagine a transaction database containing millions of records.
A Data Scientist needs:
A query might look like:
This is much more efficient for analysis than extracting the entire table and filtering everything later in Python.
๐น 32. WHERE Before Python
A common Data Science workflow is:
Database โ SQL โ Filter/Transform โ Python โ Analysis โ Model
For example:
Then load the result into Pandas:
SQL handles the database-side filtering, while Python can then handle deeper analysis.
๐น 33. Common Mistakes
โ Mistake 1: Using = with NULL
Incorrect:
Correct:
SELECT *
FROM customers
WHERE city IN ('Pune', 'Mumbai', 'Delhi');
IN checks whether a value belongs to a specified list.
๐น 23. NOT IN
You can also exclude multiple values.
SELECT *
FROM customers
WHERE city NOT IN ('Pune', 'Mumbai');
This returns customers whose city isn't Pune or Mumbai.
๐น 24. LIKE
LIKE is used for pattern matching.
Suppose we want names beginning with A.
SELECT *
FROM customers
WHERE name LIKE 'A%';
Here:
% โ Any sequence of characters
So this could match:
Alice
Amit
Ananya
๐น 25. LIKE with %
Example:
SELECT *
FROM customers
WHERE name LIKE '%an%';
This searches for names containing the sequence an.
The exact behavior can depend on database collation and case-sensitivity settings.
๐น 26. LIKE with _
The underscore _ generally represents exactly one character.
Example:
SELECT *
FROM products
WHERE product_code LIKE 'A_1';
This could match:
A11
AB1
AX1
But not:
A123
A1
because _ represents one character.
๐น 27. NULL Values
One of the most important concepts in SQL filtering is NULL.
NULL generally means:
Missing, unknown, or unavailable value.
It does not mean:
Zero
Empty string
False
For example:
customer_id name phone
101 Alice 9999999999
102 Bob NULL
Bob's phone number is missing or unknown.
๐น 28. Checking for NULL
You should not normally write:
WHERE phone = NULL
Instead, use:
SELECT *
FROM customers
WHERE phone IS NULL;
To find records where the value exists:
SELECT *
FROM customers
WHERE phone IS NOT NULL;
This is extremely important in Data Analytics.
๐น 29. WHERE and NULL Logic
Suppose:
WHERE salary > 50000
What happens when salary is NULL?
The condition isn't considered true.
The row won't be returned.
SQL uses three-valued logic involving:
TRUE
FALSE
UNKNOWN
This is one reason NULL handling requires special attention.
๐น 30. WHERE with SELECT
WHERE works together with SELECT.
Example:
SELECT
customer_id,
name,
city
FROM customers
WHERE city = 'Pune';
The query:
1.
Retrieves selected columns
2.
From the customers table
3.
Keeps only rows satisfying the condition
๐น 31. WHERE in Real-World Data Science
Imagine a transaction database containing millions of records.
A Data Scientist needs:
Successful transactions above โน10,000 from January 2026 onward.
A query might look like:
SELECT
transaction_id,
customer_id,
transaction_date,
amount
FROM transactions
WHERE status = 'Success'
AND amount > 10000
AND transaction_date >= '2026-01-01';
This is much more efficient for analysis than extracting the entire table and filtering everything later in Python.
๐น 32. WHERE Before Python
A common Data Science workflow is:
Database โ SQL โ Filter/Transform โ Python โ Analysis โ Model
For example:
SELECT
customer_id,
amount,
transaction_date
FROM transactions
WHERE status = 'Success';
Then load the result into Pandas:
import pandas as pd
df = pd.read_sql(query, connection)
SQL handles the database-side filtering, while Python can then handle deeper analysis.
๐น 33. Common Mistakes
โ Mistake 1: Using = with NULL
Incorrect:
WHERE phone = NULL;
Correct:
WHERE phone IS NULL;
โค2
โ Mistake 2: Forgetting quotes around text
Incorrect:
Correct:
โ Mistake 3: Using AND when you mean OR
Incorrect if you want either city:
A single city value cannot normally be both at the same time.
Correct:
Or:
โ Mistake 4: Forgetting parentheses
For complex conditions, use parentheses:
โ Mistake 5: Assuming BETWEEN excludes the boundaries
BETWEEN is generally inclusive.
๐น 34. Interview Questions
๐ก What is the purpose of WHERE?
WHERE filters rows based on a condition.
๐ก What is the difference between WHERE and SELECT?
SELECT โ Determines what columns/expressions appear in the result.
WHERE โ Determines which rows are included.
๐ก How do you check for NULL?
Use:
IS NULL
or:
IS NOT NULL
๐ก What is the difference between IN and OR?
IN provides a concise way to test whether a value matches any value in a list.
๐ก Is BETWEEN inclusive?
Yes, BETWEEN generally includes both boundary values.
๐ฏ Practice Questions
Q1. Write a query to retrieve employees whose salary is greater than 50,000.
Q2. Write a query to retrieve customers from Pune or Mumbai.
Q3. Write a query to retrieve products priced between 1,000 and 5,000.
Q4. Write a query to retrieve customers whose phone number is missing.
Q5. Write a query to retrieve orders where the status is Success and the amount is greater than 10,000.
๐ฏ Key Takeaways
โ WHERE is used to filter rows.
โ = checks equality.
โ <> and != can be used for not equal.
โ AND requires all specified conditions to be true.
โ OR requires at least one condition to be true.
โ IN is useful for matching multiple values.
โ BETWEEN is useful for ranges and is generally inclusive.
โ LIKE is used for pattern matching.
โ % represents a sequence of characters.
โ _ represents one character.
โ Use IS NULL and IS NOT NULL for NULL values.
โ Parentheses make complex AND/OR logic clearer and safer.
๐งญ Double Tap โค๏ธ For More
Incorrect:
WHERE city = Pune;
Correct:
WHERE city = 'Pune';
โ Mistake 3: Using AND when you mean OR
Incorrect if you want either city:
WHERE city = 'Pune'
AND city = 'Mumbai';
A single city value cannot normally be both at the same time.
Correct:
WHERE city = 'Pune'
OR city = 'Mumbai';
Or:
WHERE city IN ('Pune', 'Mumbai');โ Mistake 4: Forgetting parentheses
For complex conditions, use parentheses:
WHERE
(city = 'Pune' OR city = 'Mumbai')
AND age > 30;
โ Mistake 5: Assuming BETWEEN excludes the boundaries
BETWEEN is generally inclusive.
๐น 34. Interview Questions
๐ก What is the purpose of WHERE?
WHERE filters rows based on a condition.
๐ก What is the difference between WHERE and SELECT?
SELECT โ Determines what columns/expressions appear in the result.
WHERE โ Determines which rows are included.
๐ก How do you check for NULL?
Use:
IS NULL
or:
IS NOT NULL
๐ก What is the difference between IN and OR?
IN provides a concise way to test whether a value matches any value in a list.
๐ก Is BETWEEN inclusive?
Yes, BETWEEN generally includes both boundary values.
๐ฏ Practice Questions
Q1. Write a query to retrieve employees whose salary is greater than 50,000.
Q2. Write a query to retrieve customers from Pune or Mumbai.
Q3. Write a query to retrieve products priced between 1,000 and 5,000.
Q4. Write a query to retrieve customers whose phone number is missing.
Q5. Write a query to retrieve orders where the status is Success and the amount is greater than 10,000.
๐ฏ Key Takeaways
โ WHERE is used to filter rows.
โ = checks equality.
โ <> and != can be used for not equal.
โ AND requires all specified conditions to be true.
โ OR requires at least one condition to be true.
โ IN is useful for matching multiple values.
โ BETWEEN is useful for ranges and is generally inclusive.
โ LIKE is used for pattern matching.
โ % represents a sequence of characters.
โ _ represents one character.
โ Use IS NULL and IS NOT NULL for NULL values.
โ Parentheses make complex AND/OR logic clearer and safer.
๐งญ Double Tap โค๏ธ For More
โค6
๐ ๐๐๐๐จ๐ฆ๐ ๐๐ง ๐๐ ๐๐ง๐ ๐ข๐ง๐๐๐ซ ๐ข๐ง ๐๐๐๐
๐ฏ Choose Your Learning Track:
๐ป Java Full Stack + AI Engineering
๐ MERN Full Stack + AI Engineering
Placement Highlights: โน41 LPA highest package | โน7.4 LPA average package | 2,000+ students placed | 500+ hiring partners
๐ ๐๐ผ๐ผ๐ธ ๐๐ฅ๐๐ ๐๐ฒ๐บ๐ผ ๐๐น๐ฎ๐๐ :- https://pdlink.in/4fWJVID
โก AI is creating new career opportunitiesโstart building the skills companies need in 2026!
๐ฏ Choose Your Learning Track:
๐ป Java Full Stack + AI Engineering
๐ MERN Full Stack + AI Engineering
Placement Highlights: โน41 LPA highest package | โน7.4 LPA average package | 2,000+ students placed | 500+ hiring partners
๐ ๐๐ผ๐ผ๐ธ ๐๐ฅ๐๐ ๐๐ฒ๐บ๐ผ ๐๐น๐ฎ๐๐ :- https://pdlink.in/4fWJVID
โก AI is creating new career opportunitiesโstart building the skills companies need in 2026!
โค3
Important Excel, Tableau, Statistics, SQL related Questions with answers
1. What are the common problems that data analysts encounter during analysis?
The common problems steps involved in any analytics project are:
Handling duplicate data
Collecting the meaningful right data at the right time
Handling data purging and storage problems
Making data secure and dealing with compliance issues
2. Explain the Type I and Type II errors in Statistics?
In Hypothesis testing, a Type I error occurs when the null hypothesis is rejected even if it is true. It is also known as a false positive.
A Type II error occurs when the null hypothesis is not rejected, even if it is false. It is also known as a false negative.
3. How do you make a dropdown list in MS Excel?
First, click on the Data tab that is present in the ribbon.
Under the Data Tools group, select Data Validation.
Then navigate to Settings > Allow > List.
Select the source you want to provide as a list array.
4. How do you subset or filter data in SQL?
To subset or filter data in SQL, we use WHERE and HAVING clauses which give us an option of including only the data matching certain conditions.
5. What is a Gantt Chart in Tableau?
A Gantt chart in Tableau depicts the progress of value over the period, i.e., it shows the duration of events. It consists of bars along with the time axis. The Gantt chart is mostly used as a project management tool where each bar is a measure of a task in the project
1. What are the common problems that data analysts encounter during analysis?
The common problems steps involved in any analytics project are:
Handling duplicate data
Collecting the meaningful right data at the right time
Handling data purging and storage problems
Making data secure and dealing with compliance issues
2. Explain the Type I and Type II errors in Statistics?
In Hypothesis testing, a Type I error occurs when the null hypothesis is rejected even if it is true. It is also known as a false positive.
A Type II error occurs when the null hypothesis is not rejected, even if it is false. It is also known as a false negative.
3. How do you make a dropdown list in MS Excel?
First, click on the Data tab that is present in the ribbon.
Under the Data Tools group, select Data Validation.
Then navigate to Settings > Allow > List.
Select the source you want to provide as a list array.
4. How do you subset or filter data in SQL?
To subset or filter data in SQL, we use WHERE and HAVING clauses which give us an option of including only the data matching certain conditions.
5. What is a Gantt Chart in Tableau?
A Gantt chart in Tableau depicts the progress of value over the period, i.e., it shows the duration of events. It consists of bars along with the time axis. The Gantt chart is mostly used as a project management tool where each bar is a measure of a task in the project
โค4
๐ ๐๐ผ๐ผ๐ด๐น๐ฒ ๐ฃ๐ฟ๐ผ๐ณ๐ฒ๐๐๐ถ๐ผ๐ป๐ฎ๐น ๐๐ฒ๐ฟ๐๐ถ๐ณ๐ถ๐ฐ๐ฎ๐๐ฒ๐ ๐ถ๐ป ๐๐ฎ๐๐ฎ ๐๐ป๐ฎ๐น๐๐๐ถ๐ฐ๐ & ๐๐! ๐
Explore these 4 Google learning programs and develop practical, career-relevant skills.
๐ Explore the programs:
1๏ธโฃ Google Data Analytics Professional Certificate
2๏ธโฃ Google Business Intelligence Professional Certificate
3๏ธโฃ Google AI Essentials
4๏ธโฃ Google Advanced Data Analytics Professional Certificate
๐ ๐๐ป๐ฟ๐ผ๐น๐น ๐ณ๐ผ๐ฟ ๐๐ฅ๐๐ ๐:-
https://pdlink.in/4htgIEW
๐ Save this post and share it with someone interested in Data Analytics or AI!
Explore these 4 Google learning programs and develop practical, career-relevant skills.
๐ Explore the programs:
1๏ธโฃ Google Data Analytics Professional Certificate
2๏ธโฃ Google Business Intelligence Professional Certificate
3๏ธโฃ Google AI Essentials
4๏ธโฃ Google Advanced Data Analytics Professional Certificate
๐ ๐๐ป๐ฟ๐ผ๐น๐น ๐ณ๐ผ๐ฟ ๐๐ฅ๐๐ ๐:-
https://pdlink.in/4htgIEW
๐ Save this post and share it with someone interested in Data Analytics or AI!
โค5
Which query correctly retrieves employees whose salary is greater than 50,000?
Anonymous Quiz
9%
A) SELECT * FROM employees WHERE salary < 50000;
4%
B) SELECT * FROM employees WHERE salary = 50000;
13%
C) SELECT * FROM employees WHERE salary >= 50000;
75%
D) SELECT * FROM employees WHERE salary > 50000;
โค1
Which query returns customers from either Pune or Mumbai?
Anonymous Quiz
19%
A) WHERE city = 'Pune' AND city = 'Mumbai'
64%
B) WHERE city IN ('Pune', 'Mumbai')
7%
C) WHERE city <> 'Pune' AND city <> 'Mumbai'
10%
D) WHERE city BETWEEN 'Pune' AND 'Mumbai'
โค2
How do you find rows where the phone number is missing?
Anonymous Quiz
8%
A) WHERE phone = NULL
21%
B) WHERE phone == NULL
66%
C) WHERE phone IS NULL
4%
D) WHERE phone IN NULL
โค1
What does this condition return?
WHERE age BETWEEN 25 AND 30
WHERE age BETWEEN 25 AND 30
Anonymous Quiz
45%
Ages greater than 25 and less than 30 only
47%
Ages from 25 through 30, including both 25 and 30
6%
Only ages exactly 25 and 30
2%
Ages below 25 or above 30
โค1
Which LIKE pattern finds names that begin with the letter A?
Anonymous Quiz
31%
A) LIKE '%A'
7%
B) LIKE '_A%'
46%
C) LIKE 'A%'
15%
D) LIKE '%A%'
โค1
๐๐ฒ๐๐ฒ๐น ๐จ๐ฝ ๐ฌ๐ผ๐๐ฟ ๐ฆ๐ธ๐ถ๐น๐น๐ ๐๐ถ๐๐ต ๐ง๐ต๐ฒ๐๐ฒ ๐๐ฎ๐บ๐ฒ-๐๐ต๐ฎ๐ป๐ด๐ถ๐ป๐ด ๐๐ผ๐๐ฟ๐๐ฒ๐!
โ
Looking to learn practical, in-demand skills? These courses cover Generative AI, Cybersecurity, AI tools and Digital Marketing.
๐ซ Learn at your own pace
โกBuild career-relevant skills
๐ฅPractical learning opportunities
๐๐ ๐ฝ๐น๐ผ๐ฟ๐ฒ ๐๐ต๐ฒ ๐๐ผ๐๐ฟ๐๐ฒ๐ :-
https://pdlink.in/4z3vOYU
Save this post and share with your friends
โ
Looking to learn practical, in-demand skills? These courses cover Generative AI, Cybersecurity, AI tools and Digital Marketing.
๐ซ Learn at your own pace
โกBuild career-relevant skills
๐ฅPractical learning opportunities
๐๐ ๐ฝ๐น๐ผ๐ฟ๐ฒ ๐๐ต๐ฒ ๐๐ผ๐๐ฟ๐๐ฒ๐ :-
https://pdlink.in/4z3vOYU
Save this post and share with your friends
โค4
Complete Data Analytics Mastery: From Basics to Advanced ๐
Begin your Data Analytics journey by mastering the fundamentals:
- Understanding Data Types and Formats
- Basics of Exploratory Data Analysis (EDA)
- Introduction to Data Cleaning Techniques
- Statistical Foundations for Data Analytics
- Data Visualization Essentials
Grasp these essentials in just a week to build a solid foundation in data analytics.
Once you're comfortable, dive into intermediate topics:
- Advanced Data Visualization (using tools like Tableau)
- Hypothesis Testing and A/B Testing
- Regression Analysis
- Time Series Analysis for Analytics
- SQL for Data Analytics
Take another week to solidify these skills and enhance your ability to draw meaningful insights from data.
Ready for the advanced level? Explore cutting-edge concepts:
- Machine Learning for Data Analytics
- Predictive Analytics
- Big Data Analytics (Hadoop, Spark)
- Advanced Statistical Methods (Multivariate Analysis)
- Data Ethics and Privacy in Analytics
These advanced concepts can be mastered in a couple of weeks with focused study and practice.
Remember, mastery comes with hands-on experience:
- Work on a simple data analytics project
- Tackle an intermediate-level analysis task
- Challenge yourself with an advanced analytics project involving real-world data sets
Consistent practice and application of analytics techniques are the keys to becoming a data analytics pro.
Best platforms to learn:
- SQL courses with Certificate
- Freecodecamp Python Course
- 365DataScience
- Data Analyst Interview Questions
- Free SQL Resources
Share your progress and insights with others in the data analytics community. Enjoy the fascinating journey into the realm of data analytics! ๐ฉโ๐ป๐จโ๐ป
Join @free4unow_backup for more free resources.
Like this post if it helps ๐โค๏ธ
ENJOY LEARNING ๐๐
Begin your Data Analytics journey by mastering the fundamentals:
- Understanding Data Types and Formats
- Basics of Exploratory Data Analysis (EDA)
- Introduction to Data Cleaning Techniques
- Statistical Foundations for Data Analytics
- Data Visualization Essentials
Grasp these essentials in just a week to build a solid foundation in data analytics.
Once you're comfortable, dive into intermediate topics:
- Advanced Data Visualization (using tools like Tableau)
- Hypothesis Testing and A/B Testing
- Regression Analysis
- Time Series Analysis for Analytics
- SQL for Data Analytics
Take another week to solidify these skills and enhance your ability to draw meaningful insights from data.
Ready for the advanced level? Explore cutting-edge concepts:
- Machine Learning for Data Analytics
- Predictive Analytics
- Big Data Analytics (Hadoop, Spark)
- Advanced Statistical Methods (Multivariate Analysis)
- Data Ethics and Privacy in Analytics
These advanced concepts can be mastered in a couple of weeks with focused study and practice.
Remember, mastery comes with hands-on experience:
- Work on a simple data analytics project
- Tackle an intermediate-level analysis task
- Challenge yourself with an advanced analytics project involving real-world data sets
Consistent practice and application of analytics techniques are the keys to becoming a data analytics pro.
Best platforms to learn:
- SQL courses with Certificate
- Freecodecamp Python Course
- 365DataScience
- Data Analyst Interview Questions
- Free SQL Resources
Share your progress and insights with others in the data analytics community. Enjoy the fascinating journey into the realm of data analytics! ๐ฉโ๐ป๐จโ๐ป
Join @free4unow_backup for more free resources.
Like this post if it helps ๐โค๏ธ
ENJOY LEARNING ๐๐
โค3