Data Analytics
Perfect channel to learn Data Analytics Learn SQL, Python, Alteryx, Tableau, Power BI and many more For Promotions: @coderfun @love_data
Ko'proq ko'rsatish๐ Telegram kanali Data Analytics analitikasi
Data Analytics (@sqlspecialist) Ingliz til segmentidagi kanali faol ishtirokchi. Hozirda hamjamiyat 109 719 obunachidan iborat bo'lib, Texnologiyalar & Aralashmalar toifasida 1 116-o'rinni va Hindiston mintaqasida 2 331-o'rinni egallagan.
๐ Auditoriya koโrsatkichlari va dinamika
ะฝะตะฒัะดะพะผะพ sanasidan buyon loyiha tez oโsib, 109 719 obunachiga ega boโldi.
26 Iyun, 2026 dagi oxirgi maโlumotlarga koโra kanal barqaror faollikka ega. Oxirgi 30 kunda obunachilar soni 579 ga, soโnggi 24 soatda esa 1 ga oโzgardi va umumiy qamrov yuqori darajada qolmoqda.
- Tasdiqlash holati: Tasdiqlanmagan
- Jalb etish (ER): Auditoriya oโrtacha 2.58% darajada jalb etiladi. Nashrdan keyingi dastlabki 24 soatda kontent odatda umumiy obunachilar sonining 0.93% ini tashkil etuvchi reaksiyalarni toโplaydi.
- Post qamrovi: Har bir post oโrtacha 2 827 marta koโriladi; birinchi sutkada odatda 1 016 ta koโrish yigโiladi.
- Reaksiyalar va oโzaro taโsir: Auditoriya faol: har bir postga oโrtacha 7 ta reaksiya keladi.
- Tematik yoโnalishlar: Kontent row, sql, analytic, analyst, visualization kabi asosiy mavzularga jamlangan.
๐ Tavsif va kontent siyosati
Muallif resursni shaxsiy fikrni ifoda etish maydoni sifatida taโriflaydi:
โPerfect channel to learn Data Analytics
Learn SQL, Python, Alteryx, Tableau, Power BI and many more
For Promotions: @coderfun @love_dataโ
Yuqori yangilanish chastotasi (oxirgi maโlumot 27 Iyun, 2026 da olingan) sababli kanal doimo dolzarb va katta qamrovli boโlib qoladi. Analitika auditoriya kontent bilan faol hamkorlik qilishini, uni Texnologiyalar & Aralashmalar toifasidagi muhim taโsir nuqtasiga aylantirishini koโrsatadi.
SELECT date, sales, SUM(sales) OVER (ORDER BY date) AS running_total FROM sales_data;
2. Conditional Aggregation with CASE WHEN:
Segment data within a single query, saving time and creating versatile summaries.
SELECT COUNT(CASE WHEN status = 'Completed' THEN 1 END) AS completed_orders FROM orders;
3. CTEs for Modular Queries:
Make complex queries more readable and reusable with CTEs.
WITH filtered_sales AS (SELECT * FROM sales_data WHERE region = 'North')
SELECT product, SUM(sales) FROM filtered_sales GROUP BY product;
4. Optimize with EXISTS vs. IN:
Use EXISTS for better performance in larger datasets.
SELECT * FROM customers c WHERE EXISTS (SELECT 1 FROM orders o WHERE o.customer_id = c.id);
5. Self Joins for Row Comparisons:
Compare rows within the same table, helpful for changes over time.
SELECT a.date, (a.sales - b.sales) AS sales_diff FROM sales_data a JOIN sales_data b ON a.date = b.date + INTERVAL '1' MONTH;
6. UNION vs. UNION ALL:
Combine results from multiple queries; UNION ALL is faster as it doesnโt remove duplicates.
7. Handle NULLs with COALESCE:
Replace NULLs with defaults to avoid calculation issues.
SELECT product, COALESCE(sales, 0) AS sales FROM product_sales;
8. Pivot Data with CASE Statements:
Transform rows into columns for clearer insights.
9. Extract Data with STRING Functions:
Useful for semi-structured data; extract domains, product codes, etc.
SELECT SUBSTRING(email, CHARINDEX('@', email) + 1, LEN(email)) AS domain FROM users;
10. Indexing for Faster Queries:
Indexes speed up data retrieval, especially on frequently queried columns.
Mastering these SQL tricks will optimize your queries, simplify logic, and enable complex analyses.
Here you can find SQL Interview Resources๐
https://topmate.io/analyst/864764
Like this post if you need more ๐โค๏ธ
Share with credits: https://t.me/sqlspecialist
Hope it helps :)CREATE PROCEDURE UpdateEmployeeSalary (IN employee_id INT, IN new_salary DECIMAL(10, 2))
BEGIN
UPDATE employees
SET salary = new_salary
WHERE id = employee_id;
END;
This procedure updates an employee's salary based on their ID.
Functions: Functions are similar to stored procedures but are used to return a value. Theyโre typically used for computations and can be used in queries like regular expressions.
Use Cases:
Returning computed values, such as calculating total sales or tax.
Custom transformations or data validations.
Syntax:
CREATE FUNCTION function_name (parameters)
RETURNS return_type
BEGIN
-- SQL statements
RETURN value;
END;
Example:
CREATE FUNCTION GetEmployeeBonus (salary DECIMAL(10, 2))
RETURNS DECIMAL(10, 2)
BEGIN
RETURN salary * 0.10;
END;
In this example, the function returns 10% of an employee's salary as their bonus.
Key Differences Between Procedures and Functions:
Return Values: Procedures do not have to return a value, whereas functions must return a value.
Usage in Queries: Functions can be called from within a SELECT statement, while stored procedures cannot.
Transaction Management: Stored procedures can manage transactions (BEGIN, COMMIT, ROLLBACK), whereas functions cannot.
Performance Benefits:
Reduced Network Traffic: Since the logic is stored on the server, stored procedures reduce the need for multiple round-trips between the client and server.
Execution Plans: Stored procedures benefit from precompiled execution plans, which can improve performance on frequently executed queries.
Example: Using a Function in a Query
SELECT
employee_id,
salary,
GetEmployeeBonus(salary) AS bonus
FROM employees;
In this query, the custom function GetEmployeeBonus() is used to calculate a bonus for each employee based on their salary.
Use stored procedures and functions when you need reusable, secure, and efficient ways to handle complex logic and repetitive tasks in your database.
Writing Complex Joins
Optimise Complex SQL Queries
How to use Subqueries in SQL
Working with window functions
Like for more โค๏ธ
Here you can find SQL Interview Resources๐
https://topmate.io/analyst/864764
Share with credits: https://t.me/sqlspecialist
Hope it helps :)SELECT column_name,
window_function() OVER (PARTITION BY column_name ORDER BY column_name) AS alias
FROM table_name;
Key Use Cases:
Rankings and Row Numbers: Use functions like RANK(), ROW_NUMBER(), and DENSE_RANK() to rank data while preserving individual rows.
Running Totals: Use SUM() with a window to compute cumulative totals over a partition of rows.
Moving Averages: Use AVG() with a window to calculate averages over a specific range of rows (e.g., for trend analysis).
Lag and Lead: These functions allow you to access data from previous or subsequent rows without using self-joins.
PARTITION BY vs. ORDER BY:
PARTITION BY works like a GROUP BY clause, dividing the data into segments before applying the window function.
ORDER BY specifies how the rows within each partition are ordered for the window function calculation.
Common Window Functions:
ROW_NUMBER(): Assigns a unique number to each row in the result set.
RANK(): Assigns a rank to each row with gaps between tied ranks.
DENSE_RANK(): Similar to RANK(), but without gaps between ranks.
SUM(), AVG(): Can be used to calculate running totals or averages.
Example: Cumulative Total
SELECT
employee_id,
salary,
SUM(salary) OVER (ORDER BY employee_id) AS cumulative_salary
FROM employees;
In this query, we calculate a cumulative total of salaries as we move down the list of employees ordered by employee_id. The SUM() function calculates the running total without collapsing rows.
Example: Ranking Employees by Salary
SELECT
employee_id,
salary,
RANK() OVER (ORDER BY salary DESC) AS salary_rank
FROM employees;
Here, the RANK() function assigns a rank to each employee based on their salary, with the highest-paid employee getting a rank of 1.
Window functions are highly flexible and can replace more complex queries involving JOINs and GROUP BY. When working with large datasets, make sure to test performance, as window functions can be computationally intensive.
Here you can find SQL Interview Resources๐
https://topmate.io/analyst/864764
Share with credits: https://t.me/sqlspecialist
Hope it helps :)SELECT customer_id, customer_name
FROM customers
WHERE customer_id IN (
SELECT customer_id
FROM orders
WHERE order_date > '2023-01-01'
);
In this example, the subquery retrieves customer IDs that placed orders after a specific date. The outer query uses this subquery to filter the list of customers.
Alternative with JOIN:
While subqueries are useful, a JOIN can sometimes be more efficient. The query above could be rewritten as a JOIN:
SELECT DISTINCT customers.customer_id, customers.customer_name
FROM customers
JOIN orders ON customers.customer_id = orders.customer_id
WHERE orders.order_date > '2023-01-01';
Choose Wisely: Always consider whether a subquery or a JOIN makes more sense for the specific problem. JOINs are typically faster for larger datasets, but subqueries can be more readable in some cases.
When working with subqueries, always test their performance, especially if they are nested within other queries or return large result sets. Consider using indexing to improve speed where possible.
Writing Complex Joins
Optimise Complex SQL Queries
Here you can find SQL Interview Resources๐
https://topmate.io/analyst/864764
Share with credits: https://t.me/sqlspecialist
Hope it helps :)
Endi mavjud! Telegram Tadqiqoti 2025 โ yilning asosiy insaytlari 
