
- Main
- Catalog
- Computer science
- Data Analytics - SQL, Python, Excel, AI & ChatGPT
Data Analytics - SQL, Python, Excel, AI & ChatGPT
Global English-speaking audience in this telegram channel who are interested in learning about new things and data oriented stuff.
Channel statistics
SELECT
name,
department,
salary,
DENSE_RANK() OVER (PARTITION BY department ORDER BY salary DESC) AS salary_rank
FROM employees;{}
I applied DENSE_RANK() window function partitioned by department and ordered by descending salary to assign ranks within each department. Unlike ROW_NUMBER(), DENSE_RANK() handles ties by assigning the same rank without gaps. This is ideal for leaderboards or performance analytics.
𝗧𝗶𝗽 𝗳𝗼𝗿 𝗦𝗤𝗟 𝗝𝗼𝗯 𝗦𝗲𝗲𝗸𝗲𝗿𝘀:
Master window function differences (ROW_NUMBER vs RANK vs DENSE_RANK)—they're interview staples for deduping, paging, and top-N queries!
React with ❤️ for more
SELECT
department,
MAX(salary) AS second_highest_salary
FROM (
SELECT
department,
salary,
ROW_NUMBER() OVER (PARTITION BY department ORDER BY salary DESC) as rn
FROM employees
) ranked
WHERE rn = 2
GROUP BY department;{}
I used a subquery with ROW_NUMBER() window function partitioned by department to rank salaries in descending order within each department. The outer query then filters for rank 2 (second highest) and groups to get distinct departments. This demonstrates mastery of window functions, which are essential for advanced analytics and ranking problems.
𝗧𝗶𝗽 𝗳𝗼𝗿 𝗦𝗤𝗟 𝗝𝗼𝗯 𝗦𝗲𝗲𝗸𝗲𝗿𝘀:
Window functions like ROW_NUMBER(), RANK(), and DENSE_RANK() unlock complex ranking and analytics—practice them daily to ace behavioral and technical rounds!
React with ❤️ for moreReviews channel
7 total reviews
- Added: Newest first
- Added: Oldest first
- Rating: High to low
- Rating: Low to high
Catalog of Telegram Channels for Native Placements
Data Analytics - SQL, Python, Excel, AI & ChatGPT is a Telegram channel in the category «Интернет технологии», offering effective formats for placing advertising posts on TG. The channel has 108K subscribers and provides quality content. The advertising posts on the channel help brands attract audience attention and increase reach. The channel's rating is 12.7, with 7 reviews and an average score of 5.0.
You can launch an advertising campaign through the Telega.in service, choosing a convenient format for placement. The Platform provides transparent cooperation conditions and offers detailed analytics. The placement cost is 76.8 ₽, and with 43 completed requests, the channel has established itself as a reliable partner for advertising on Telegram. Place integrations today and attract new clients!
You will be able to add channels from the catalog to the cart again.
Комментарий