Data Science. SQL hub
По всем вопросам- @workakkk @itchannels_telegram - 🔥лучшие ит-каналы @ai_machinelearning_big_data - Machine learning @pythonl - Python @pythonlbooks- python книги📚 @datascienceiot - ml книги📚 РКН: https://vk.cc/cIi9vo #VRHSZ
Show more📈 Analytical overview of Telegram channel Data Science. SQL hub
Channel Data Science. SQL hub (@sqlhub) in the Russian language segment is an active participant. Currently, the community unites 36 055 subscribers, ranking 3 721 in the Technologies & Applications category and 17 582 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 36 055 subscribers.
According to the latest data from 04 November, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by 86 over the last 30 days and by -4 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 8.96%. Within the first 24 hours after publication, content typically collects 3.89% reactions from the total number of subscribers.
- Post reach: On average, each post receives 3 231 views. Within the first day, a publication typically gains 1 404 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 7.
- Thematic interests: Content is focused on key topics such as sql, индекс, postgres, index, sqlite.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“По всем вопросам- @workakkk
@itchannels_telegram - 🔥лучшие ит-каналы
@ai_machinelearning_big_data - Machine learning
@pythonl - Python
@pythonlbooks- python книги📚
@datascienceiot - ml книги📚
РКН: https://vk.cc/cIi9vo
#VRHSZ”
Thanks to the high frequency of updates (latest data received on 05 November, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
8 отдельных файлов, чтобы найти строки, в которых id = 5. Однако при оптимизации Z Order запрос должен просканировать только один файл, чтобы найти нужные строки.
• Delta Lake Z Order
• Что такое Delta Lake
@sqlhub-- sf100_orders_annotated.sql
{{ config(materialized='table') }}
select a.*, b.date is not null is_holiday
from {{ref('sf100_orders')}} a
left join {{ref('all_holidays')}} b
on a.o_orderdate = b.date
-- count_holidays.sql
{{config(materialized='table')}}
select count(*) total_days
, count_if(is_holiday) holiday_count
, holiday_count/total_days ratio
from {{ref('sf100_orders_annotated')}}
Эти два файла выглядят как типичный SQL, но с некоторым отличием. Вместо ссылок на таблицы dbt позволяет ссылаться на другие “модели” с помощью аннотаций {{ref(‘sf100_orders_annotated’)}}. Таким образом, dbt определяет связь и зависимости между всеми трансформациями, через которые проходят данные.
📌 Продолжение
@sqlhubпайплайн (конвейер).
Как и SQL, он легко читается, является явным и декларативным. Но в отличие от SQL, он формирует логический пайплайн преобразований и поддерживает такие абстракции, как переменные и функции. Он может использоваться с любой базой данных, использующей SQL.
from tracks
filter artist == "Bob Marley" # Each line transforms the previous result
aggregate { # `aggregate` reduces each column to a value
plays = sum plays,
longest = max length,
shortest = min length, # Trailing commas are allowed
}
• Github
@sqlhub$ pip install sqlparse
import sqlparse
Файл с примерам кода и документацией по работе в закрепе.
raw = 'select * from foo; select * from bar;'
statements = sqlparse.split(raw)
statements
['select * from foo;', 'select * from bar;']
first = statements[0]
print(sqlparse.format(first, reindent=True, keyword_case='upper'))
SELECT *
FROM foo;
>>> # Parsing a SQL statement:
parsed = sqlparse.parse('select * from foo')[0]
parsed.tokens
[<DML 'select' at 0x7f22c5e15368>, <Whitespace ' ' at 0x7f22c5e153b0>, <Wildcard '*' … ]
@sqlhubWITH employee_ranking AS (
SELECT
employee_id,
last_name,
first_name,
salary,
RANK() OVER (ORDER BY salary DESC) as ranking
FROM employee
)
SELECT
employee_id,
last_name,
first_name,
salary
FROM employee_ranking
WHERE ranking = 2
Условие WHERE ranking = 2 используется для фильтрации строк второй по величине зарплаты. Обратите внимание, что на позиции 2 может находиться более одного сотрудника, если у них одинаковая зарплата.
На данном этапе важно понять поведение функции RANK(), а также других доступных функций, таких как ROW_NUMBER() и DENSE_RANK(). Эта тема подробно рассматривается в статье - "Обзор функций ранжирования в SQL". Я рекомендую прочитать эту статью, если вам придется работать с различными видами ранжирования.
@sqlhub