If you are interested to learn SQL for data analytics purpose and clear the interviews, just cover the following topics ๐
1. Install MYSQL workbench ๐ป
2. Select ๐
3. From ๐
4. where ๐
5. group by ๐
6. having ๐
7. limit ๐
8. Joins (Left, right , inner, self, cross) ๐ค
9. Aggregate function ( Sum, Max, Min , Avg) ๐
10. windows function ( row num, rank, dense rank, lead, lag, Sum () over) ๐
11. Case ๐ค
12. Like ๐
13. Sub queries ๐
14. CTE ๐
15. Replace CTE with temp tables ๐
16. Methods to optimize Sql queries ๐
17. Solve problems and case studies
Trick: Just copy each term and paste on youtube and watch any 10 to 15 minute on each topic and practise it while learning , By doing this , you get the basics understanding ๐
18. Now time to go on youtube and search data analysis end to end project using sql ๐
19. Watch them and practise them end to end ๐บ
20. learn integration with power bi ๐
In this way , you will not only memorize the concepts but also learn how to implement them in your current working and projects and will be able to defend it in your interviews as well ๐.
Like for more ๐
Here you can find essential resources
๐๐
https://t.me/sqlresourcestp
Hope it helps :) ๐
Follow This WhatsApp Channel for More Resources:
https://whatsapp.com/channel/0029VahGttK5a24AXAJDjm2R
1. Install MYSQL workbench ๐ป
2. Select ๐
3. From ๐
4. where ๐
5. group by ๐
6. having ๐
7. limit ๐
8. Joins (Left, right , inner, self, cross) ๐ค
9. Aggregate function ( Sum, Max, Min , Avg) ๐
10. windows function ( row num, rank, dense rank, lead, lag, Sum () over) ๐
11. Case ๐ค
12. Like ๐
13. Sub queries ๐
14. CTE ๐
15. Replace CTE with temp tables ๐
16. Methods to optimize Sql queries ๐
17. Solve problems and case studies
Trick: Just copy each term and paste on youtube and watch any 10 to 15 minute on each topic and practise it while learning , By doing this , you get the basics understanding ๐
18. Now time to go on youtube and search data analysis end to end project using sql ๐
19. Watch them and practise them end to end ๐บ
20. learn integration with power bi ๐
In this way , you will not only memorize the concepts but also learn how to implement them in your current working and projects and will be able to defend it in your interviews as well ๐.
Like for more ๐
Here you can find essential resources
๐๐
https://t.me/sqlresourcestp
Hope it helps :) ๐
Follow This WhatsApp Channel for More Resources:
https://whatsapp.com/channel/0029VahGttK5a24AXAJDjm2R
2025 Google Conference Scholarships
Perks:
* Roundtrip airfare
* Conference registration
* $100 stipend
* Hotel accommodation
Criteria:
* Be a full-time student enrolled with a recognized university in Africa OR Asia Pacific(APAC) who is in need of conference travel funds.
* If you're Non-African, also check the provided link for appropriate option.
Apply here:
https://kenyatrends.co.ke/2025-google-conference-scholarships/
Perks:
* Roundtrip airfare
* Conference registration
* $100 stipend
* Hotel accommodation
Criteria:
* Be a full-time student enrolled with a recognized university in Africa OR Asia Pacific(APAC) who is in need of conference travel funds.
* If you're Non-African, also check the provided link for appropriate option.
Apply here:
https://kenyatrends.co.ke/2025-google-conference-scholarships/
Interviewer: "What do you know about our company?"
Candidate: "I think you do something related to tech?"
Big mistake! A vague or uncertain response makes you look unprepared & disinterested. Employers want to see that youโve taken the time to understand their company & why youโd be a great fit.
What NOT to say:
โ "I donโt know much, but Iโm eager to learn" (shows a lack of preparation)
โ "I just saw the job posting & applied" (feels random & unintentional)
โ "Itโs a big company, so I thought itโd be a good opportunity" (too generic & uninformed)
How to IMPRESS with your answer:
โ๏ธ Shows research & enthusiasm
"Your company is a leader in [industry/product/service] & I was excited to learn about your recent [mention an achievement, innovation or project]. I really admire your commitment to [company value or mission] & thatโs one of the reasons Iโm drawn to this opportunity"
โ๏ธ Demonstrates genuine interest
"From what Iโve read, your company stands out for [unique aspect: innovation, company culture, impact]. One thing that caught my attention was [specific initiative or milestone] & Iโd love the opportunity to contribute to something similar"
โ๏ธ Aligns your goals with the companyโs vision
"Iโve been following your companyโs growth & I truly respect how you [mention key values, industry influence, sustainability efforts, etc.]. The way you [specific company approach] aligns with my own professional goals & Iโm excited about the potential to be part of your team"
Take a few minutes to research before your interview, check their website, social media, recent news & LinkedIn updates. A well-prepared candidate always stands out!
Candidate: "I think you do something related to tech?"
Big mistake! A vague or uncertain response makes you look unprepared & disinterested. Employers want to see that youโve taken the time to understand their company & why youโd be a great fit.
What NOT to say:
โ "I donโt know much, but Iโm eager to learn" (shows a lack of preparation)
โ "I just saw the job posting & applied" (feels random & unintentional)
โ "Itโs a big company, so I thought itโd be a good opportunity" (too generic & uninformed)
How to IMPRESS with your answer:
โ๏ธ Shows research & enthusiasm
"Your company is a leader in [industry/product/service] & I was excited to learn about your recent [mention an achievement, innovation or project]. I really admire your commitment to [company value or mission] & thatโs one of the reasons Iโm drawn to this opportunity"
โ๏ธ Demonstrates genuine interest
"From what Iโve read, your company stands out for [unique aspect: innovation, company culture, impact]. One thing that caught my attention was [specific initiative or milestone] & Iโd love the opportunity to contribute to something similar"
โ๏ธ Aligns your goals with the companyโs vision
"Iโve been following your companyโs growth & I truly respect how you [mention key values, industry influence, sustainability efforts, etc.]. The way you [specific company approach] aligns with my own professional goals & Iโm excited about the potential to be part of your team"
Take a few minutes to research before your interview, check their website, social media, recent news & LinkedIn updates. A well-prepared candidate always stands out!
๐๐ข๐๐ซ๐จ๐ฌ๐จ๐๐ญ ๐
๐๐๐ ๐๐๐ซ๐ญ๐ข๐๐ข๐๐๐ญ๐ข๐จ๐ง ๐๐จ๐ฎ๐ซ๐ฌ๐๐ฌ๐
- Artificial Intelligence (AI)
- Internet Of Things (IoT)
- Machine Learning (ML)
- Data Science
๐ Globally Recognized Certification
๐ 100% FREE โ No Hidden Costs!
๐ Boost Your Resume & Career
๐๐ง๐ซ๐จ๐ฅ๐ฅ ๐๐จ๐ซ ๐ ๐๐๐ ๐:-
https://bit.ly/3DBGkzk
๐ฏ Learn. Get Certified. Shine Bright!๐โจ
- Artificial Intelligence (AI)
- Internet Of Things (IoT)
- Machine Learning (ML)
- Data Science
๐ Globally Recognized Certification
๐ 100% FREE โ No Hidden Costs!
๐ Boost Your Resume & Career
๐๐ง๐ซ๐จ๐ฅ๐ฅ ๐๐จ๐ซ ๐ ๐๐๐ ๐:-
https://bit.ly/3DBGkzk
๐ฏ Learn. Get Certified. Shine Bright!๐โจ
Quick Recap of Essential SQL Concepts
1๏ธโฃ FROM clause: Specifies the tables from which data will be retrieved.
2๏ธโฃ WHERE clause: Filters rows based on specified conditions.
3๏ธโฃ GROUP BY clause: Groups rows that have the same values into summary rows.
4๏ธโฃ HAVING clause: Filters groups based on specified conditions.
5๏ธโฃ SELECT clause: Specifies the columns to be retrieved.
6๏ธโฃ WINDOW functions: Functions that perform calculations across a set of table rows.
7๏ธโฃ AGGREGATE functions: Functions like COUNT, SUM, AVG that perform calculations on a set of values.
8๏ธโฃ UNION / UNION ALL: Combines the result sets of multiple SELECT statements.
9๏ธโฃ ORDER BY clause: Sorts the result set based on specified columns.
๐ LIMIT / OFFSET (or FETCH / OFFSET in some databases): Controls the number of rows returned and starting point for retrieval.
Here you can find quick SQL Revision Notes๐
https://t.me/sqlresourcestp
Hope it helps :)
More Resources Here
https://whatsapp.com/channel/0029VahGttK5a24AXAJDjm2R
1๏ธโฃ FROM clause: Specifies the tables from which data will be retrieved.
2๏ธโฃ WHERE clause: Filters rows based on specified conditions.
3๏ธโฃ GROUP BY clause: Groups rows that have the same values into summary rows.
4๏ธโฃ HAVING clause: Filters groups based on specified conditions.
5๏ธโฃ SELECT clause: Specifies the columns to be retrieved.
6๏ธโฃ WINDOW functions: Functions that perform calculations across a set of table rows.
7๏ธโฃ AGGREGATE functions: Functions like COUNT, SUM, AVG that perform calculations on a set of values.
8๏ธโฃ UNION / UNION ALL: Combines the result sets of multiple SELECT statements.
9๏ธโฃ ORDER BY clause: Sorts the result set based on specified columns.
๐ LIMIT / OFFSET (or FETCH / OFFSET in some databases): Controls the number of rows returned and starting point for retrieval.
Here you can find quick SQL Revision Notes๐
https://t.me/sqlresourcestp
Hope it helps :)
More Resources Here
https://whatsapp.com/channel/0029VahGttK5a24AXAJDjm2R
๐๐ซ๐ ๐ฒ๐จ๐ฎ ๐ฉ๐ซ๐๐ฉ๐๐ซ๐ข๐ง๐ ๐๐จ๐ซ ๐๐๐ ๐ข๐ง๐ญ๐๐ซ๐ฏ๐ข๐๐ฐ๐ฌ? ๐
Donโt miss these top SQL questions recently asked by leading companies!
Top 45 SQL Interview Questions & Answers
๐๐ข๐ง๐ค๐:- https://bit.ly/4iH0Z3K
Start practicing today and stand out from the competition! ๐ป
Donโt miss these top SQL questions recently asked by leading companies!
Top 45 SQL Interview Questions & Answers
๐๐ข๐ง๐ค๐:- https://bit.ly/4iH0Z3K
Start practicing today and stand out from the competition! ๐ป
๐1
2 Remote Tech Jobs at Zerion
1. Senior BackEnd Engineer
2. Senior Product Designer
Apply Here:
https://kenyatrends.co.ke/c4pc
1. Senior BackEnd Engineer
2. Senior Product Designer
Apply Here:
https://kenyatrends.co.ke/c4pc
๐๐ & ๐๐ ๐
๐๐๐ ๐๐๐ซ๐ญ๐ข๐๐ข๐๐๐ญ๐ข๐จ๐ง ๐๐จ๐ฎ๐ซ๐ฌ๐๐ฌ ๐
๐ซ๐จ๐ฆ 6 ๐๐จ๐ฉ ๐๐ง๐ฌ๐ญ๐ข๐ญ๐ฎ๐ญ๐ข๐จ๐ง๐ฌ!๐
Explore these 6 amazing courses offered by the Government of India, Google, Harvard, MIT, and IBM.
Gain hands-on knowledge in Generative AI, Python, Machine Learning, and AIโs impact on business strategyโall at no cost.
Plus, youโll earn certificates to boost your resume!
๐๐ข๐ง๐ค ๐:-
https://bit.ly/4hCdn45
Enroll For FREE & Get Certified ๐
Explore these 6 amazing courses offered by the Government of India, Google, Harvard, MIT, and IBM.
Gain hands-on knowledge in Generative AI, Python, Machine Learning, and AIโs impact on business strategyโall at no cost.
Plus, youโll earn certificates to boost your resume!
๐๐ข๐ง๐ค ๐:-
https://bit.ly/4hCdn45
Enroll For FREE & Get Certified ๐
Forwarded from Artificial Intelligence Resources TP . AI Tools . AI Updates
๐๐จ๐จ๐ ๐ฅ๐ ๐
๐๐๐ ๐๐/๐๐ ๐๐๐ซ๐ญ๐ข๐๐ข๐๐๐ญ๐ข๐จ๐ง ๐๐จ๐ฎ๐ซ๐ฌ๐
Unlock the world of AI/ML with Googleโs completely free course series!
Learn everything from the basics of machine learning to advanced AI applications, guided by experts at Google.
๐๐ข๐ง๐ค๐ :-
https://tinyurl.com/53bpvmkc
Enroll For FREE & Get Certified๐
Unlock the world of AI/ML with Googleโs completely free course series!
Learn everything from the basics of machine learning to advanced AI applications, guided by experts at Google.
๐๐ข๐ง๐ค๐ :-
https://tinyurl.com/53bpvmkc
Enroll For FREE & Get Certified๐
โค1
SQL Interview Questions !!
๐ Write a query to find all employees whose salaries exceed the company's average salary.
๐ Write a query to retrieve the names of employees who work in the same department as 'John Doe'.
๐ Write a query to display the second highest salary from the Employee table without using the MAX function twice.
๐ Write a query to find all customers who have placed more than five orders.
๐ Write a query to count the total number of orders placed by each customer.
๐ Write a query to list employees who joined the company within the last 6 months.
๐ Write a query to calculate the total sales amount for each product.
๐ Write a query to list all products that have never been sold.
๐ Write a query to remove duplicate rows from a table.
๐ Write a query to identify the top 10 customers who have not placed any orders in the past year.
Here you can find essential SQL Interview Resources๐
https://t.me/sqlresourcestp/40
Like this post if you need more ๐โค๏ธ
Hope it helps :)
More Resources Here
https://whatsapp.com/channel/0029VahGttK5a24AXAJDjm2R
๐ Write a query to find all employees whose salaries exceed the company's average salary.
๐ Write a query to retrieve the names of employees who work in the same department as 'John Doe'.
๐ Write a query to display the second highest salary from the Employee table without using the MAX function twice.
๐ Write a query to find all customers who have placed more than five orders.
๐ Write a query to count the total number of orders placed by each customer.
๐ Write a query to list employees who joined the company within the last 6 months.
๐ Write a query to calculate the total sales amount for each product.
๐ Write a query to list all products that have never been sold.
๐ Write a query to remove duplicate rows from a table.
๐ Write a query to identify the top 10 customers who have not placed any orders in the past year.
Here you can find essential SQL Interview Resources๐
https://t.me/sqlresourcestp/40
Like this post if you need more ๐โค๏ธ
Hope it helps :)
More Resources Here
https://whatsapp.com/channel/0029VahGttK5a24AXAJDjm2R
๐
๐๐๐ ๐๐๐ซ๐ญ๐ข๐๐ข๐๐๐ญ๐ข๐จ๐ง ๐๐จ๐ฎ๐ซ๐ฌ๐๐ฌ ๐๐จ ๐๐๐๐จ๐ฆ๐ ๐๐ค๐ข๐ฅ๐ฅ๐๐ ๐๐ป ๐๐๐๐
Free lifetime access โ Learn anytime, anywhere
Get Completion Certificate
๐๐ข๐ง๐ค๐:-
http://bit.ly/3RdeYTh
Enroll For FREE & Get Certified๐
Free lifetime access โ Learn anytime, anywhere
Get Completion Certificate
๐๐ข๐ง๐ค๐:-
http://bit.ly/3RdeYTh
Enroll For FREE & Get Certified๐
๐๐๐ ๐
๐๐๐ ๐๐๐ซ๐ญ๐ข๐๐ข๐๐๐ญ๐ข๐จ๐ง ๐๐จ๐ฎ๐ซ๐ฌ๐๐ฌ
๐ Here are some top resources offering free courses to help you learn SQL from scratch or level up your skills.
Whether you're preparing for interviews, aiming for a job in data analytics, or improving your database knowledge, these courses have got you covered!
๐๐ข๐ง๐ค ๐:-
https://bit.ly/3FyzZW2
Enroll For FREE & Get Certified ๐
๐ Here are some top resources offering free courses to help you learn SQL from scratch or level up your skills.
Whether you're preparing for interviews, aiming for a job in data analytics, or improving your database knowledge, these courses have got you covered!
๐๐ข๐ง๐ค ๐:-
https://bit.ly/3FyzZW2
Enroll For FREE & Get Certified ๐
๐๐๐ฆ๐๐ข ๐๐ฅ๐๐ ๐๐ฒ๐ฟ๐๐ถ๐ณ๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป ๐๐ผ๐๐ฟ๐๐ฒ๐
- Data Analytics
- Data Science
- Python
- Javascript
- Cybersecurity
๐๐ข๐ง๐ค ๐:-
https://bit.ly/4i9Kc9Z
Enroll For FREE & Get Certified๐
- Data Analytics
- Data Science
- Python
- Javascript
- Cybersecurity
๐๐ข๐ง๐ค ๐:-
https://bit.ly/4i9Kc9Z
Enroll For FREE & Get Certified๐
Complete SQL Topics for Data Analysis
-> https://t.me/sqlresourcestp/83
Let's start with the first topic:
SQL Learning Series Part-1
### 1. Introduction to SQL:
SQL (Structured Query Language) is a programming language designed for managing and querying relational databases. It provides a standardized way to interact with databases. The basic structure of an SQL query involves:
- SELECT: Specifies the columns to retrieve.
- FROM: Specifies the table from which to retrieve the data.
- WHERE: Filters the rows based on a condition.
Example:
This query retrieves the first name and last name of employees working in the IT department.
Share with credits: https://t.me/sqlresourcestp
Hope it helps :)
-> https://t.me/sqlresourcestp/83
Let's start with the first topic:
SQL Learning Series Part-1
### 1. Introduction to SQL:
SQL (Structured Query Language) is a programming language designed for managing and querying relational databases. It provides a standardized way to interact with databases. The basic structure of an SQL query involves:
SELECT column1, column2 FROM table_name WHERE condition;
- SELECT: Specifies the columns to retrieve.
- FROM: Specifies the table from which to retrieve the data.
- WHERE: Filters the rows based on a condition.
Example:
SELECT first_name, last_name FROM employees WHERE department = 'IT';
This query retrieves the first name and last name of employees working in the IT department.
Share with credits: https://t.me/sqlresourcestp
Hope it helps :)
๐2
SQL Learning Series Part-2
Complete SQL Topics for Data Analysis
-> https://t.me/sqlresourcestp/83
Querying Data
Now that we understand the basic structure, let's delve into querying data with more detail.
#### SELECT Statement:
The SELECT statement retrieves data from one or more tables. You can select specific columns or use * to select all columns.
#### Filtering Data with WHERE:
The WHERE clause filters rows based on a specified condition.
Example:
This query retrieves the product names and prices for items in the 'Electronics' category.
#### Sorting Data with ORDER BY:
The ORDER BY clause sorts the result set based on one or more columns.
Example:
This query sorts products by price in descending order.
Understanding these fundamentals is crucial for effective data retrieval.
Share with credits: https://t.me/sqlresourcestp
Hope it helps :)
Complete SQL Topics for Data Analysis
-> https://t.me/sqlresourcestp/83
Querying Data
Now that we understand the basic structure, let's delve into querying data with more detail.
#### SELECT Statement:
The SELECT statement retrieves data from one or more tables. You can select specific columns or use * to select all columns.
-- Selecting specific columns
SELECT column1, column2 FROM table_name;
-- Selecting all columns
SELECT * FROM table_name;
#### Filtering Data with WHERE:
The WHERE clause filters rows based on a specified condition.
SELECT column1, column2 FROM table_name WHERE condition;
Example:
SELECT product_name, price FROM products WHERE category = 'Electronics';
This query retrieves the product names and prices for items in the 'Electronics' category.
#### Sorting Data with ORDER BY:
The ORDER BY clause sorts the result set based on one or more columns.
SELECT column1, column2 FROM table_name ORDER BY column1 [ASC|DESC];
Example:
SELECT product_name, price FROM products ORDER BY price DESC;
This query sorts products by price in descending order.
Understanding these fundamentals is crucial for effective data retrieval.
Share with credits: https://t.me/sqlresourcestp
Hope it helps :)
SQL Learning Series Part-3
Complete SQL Topics for Data Analysis
-> https://t.me/sqlresourcestp/83
Today, we will learn about Joins in more detail.
Joins allow you to combine rows from two or more tables based on related columns. There are several types of joins:
#### INNER JOIN:
Returns rows when there is a match in both tables.
#### LEFT JOIN (or LEFT OUTER JOIN):
Returns all rows from the left table and matching rows from the right table.
#### RIGHT JOIN (or RIGHT OUTER JOIN):
Returns all rows from the right table and matching rows from the left table.
#### FULL JOIN (or FULL OUTER JOIN):
Returns all rows when there is a match in either table.
Joins are powerful for combining data from different sources.
Share with credits: https://t.me/sqlresourcestp
Hope it helps :)
Complete SQL Topics for Data Analysis
-> https://t.me/sqlresourcestp/83
Today, we will learn about Joins in more detail.
Joins allow you to combine rows from two or more tables based on related columns. There are several types of joins:
#### INNER JOIN:
Returns rows when there is a match in both tables.
SELECT column1, column2 FROM table1 INNER JOIN table2 ON table1.column = table2.column;
#### LEFT JOIN (or LEFT OUTER JOIN):
Returns all rows from the left table and matching rows from the right table.
SELECT column1, column2 FROM table1 LEFT JOIN table2 ON table1.column = table2.column;
#### RIGHT JOIN (or RIGHT OUTER JOIN):
Returns all rows from the right table and matching rows from the left table.
SELECT column1, column2 FROM table1 RIGHT JOIN table2 ON table1.column = table2.column;
#### FULL JOIN (or FULL OUTER JOIN):
Returns all rows when there is a match in either table.
SELECT column1, column2 FROM table1 FULL JOIN table2 ON table1.column = table2.column;
Joins are powerful for combining data from different sources.
Share with credits: https://t.me/sqlresourcestp
Hope it helps :)
SQL LEARNING SERIES PART-4
Complete SQL Topics for Data Analysis
-> https://t.me/sqlresourcestp/83
Today, we will learn about Aggregate Functions
Aggregation functions perform calculations on sets of values and return a single result. Common aggregation functions include:
#### COUNT():
Counts the number of rows in a result set.
#### SUM():
Calculates the sum of values in a column.
#### AVG():
Calculates the average value of a numeric column.
#### MAX():
Returns the maximum value in a column.
#### MIN():
Returns the minimum value in a column.
Example:
This query counts the number of orders and calculates the average total amount for a specific customer.
Understanding aggregation is crucial for summarizing and analyzing data.
Share with credits: https://t.me/sqlresourcestp
Hope it helps :)
Complete SQL Topics for Data Analysis
-> https://t.me/sqlresourcestp/83
Today, we will learn about Aggregate Functions
Aggregation functions perform calculations on sets of values and return a single result. Common aggregation functions include:
#### COUNT():
Counts the number of rows in a result set.
SELECT COUNT(column) FROM table;
#### SUM():
Calculates the sum of values in a column.
SELECT SUM(column) FROM table;
#### AVG():
Calculates the average value of a numeric column.
SELECT AVG(column) FROM table;
#### MAX():
Returns the maximum value in a column.
SELECT MAX(column) FROM table;
#### MIN():
Returns the minimum value in a column.
SELECT MIN(column) FROM table;
Example:
SELECT COUNT(order_id), AVG(total_amount) FROM orders WHERE customer_id = 123;
This query counts the number of orders and calculates the average total amount for a specific customer.
Understanding aggregation is crucial for summarizing and analyzing data.
Share with credits: https://t.me/sqlresourcestp
Hope it helps :)
SQL LEARNING SERIES PART-5
Complete SQL Topics for Data Analysis
-> https://t.me/sqlresourcestp/83
Today, we will learn about Subqueries
Subqueries, also known as nested queries, allow you to use the result of one query within another query. There are different types of subqueries:
#### Subquery in SELECT:
Using a subquery to retrieve a single value.
#### Subquery in WHERE:
Filtering based on the result of a subquery.
#### Subquery in HAVING:
Filtering aggregated results with a subquery.
Subqueries are useful for complex queries and can be employed in various parts of a statement.
Share with credits: https://t.me/sqlresourcestp
Hope it helps :)
Complete SQL Topics for Data Analysis
-> https://t.me/sqlresourcestp/83
Today, we will learn about Subqueries
Subqueries, also known as nested queries, allow you to use the result of one query within another query. There are different types of subqueries:
#### Subquery in SELECT:
Using a subquery to retrieve a single value.
SELECT column1, (SELECT column2 FROM table2 WHERE condition) AS subquery_result FROM table1;
#### Subquery in WHERE:
Filtering based on the result of a subquery.
SELECT column1 FROM table1 WHERE column2 = (SELECT column3 FROM table2 WHERE condition);
#### Subquery in HAVING:
Filtering aggregated results with a subquery.
SELECT column1, COUNT(column2) FROM table1 GROUP BY column1 HAVING COUNT(column2) > (SELECT threshold FROM settings);
Subqueries are useful for complex queries and can be employed in various parts of a statement.
Share with credits: https://t.me/sqlresourcestp
Hope it helps :)