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 043 subscribers, ranking 3 729 in the Technologies & Applications category and 17 585 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 36 043 subscribers.
According to the latest data from 05 November, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by 75 over the last 30 days and by -7 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 9.27%. Within the first 24 hours after publication, content typically collects 3.91% reactions from the total number of subscribers.
- Post reach: On average, each post receives 3 342 views. Within the first day, a publication typically gains 1 408 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 8.
- 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 06 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.
field1, field2, field3.
Задача получить в одном запросе два значения:
Максимум поля field1
Значение поля field2 в записи, где поле field3 максимально.
Значения поля field3 уникальны, так что оба ответа однозначны.
Решить эти две задачи двумя запросами не проблема.
1) SELECT MAX(field1) FROM table;
2)SELECT field2 FROM table
ORDER BY field3 DESC
LIMIT 1;
или используем для второй задачи вариант с WHERE:
SELECT field2 FROM table
WHERE field3 = (SELECT MAX(field3) FROM table);
Как получить оба в одном запросе
Есть два хорошо оптимизированных запроса (при условии что соответствующие индексы в наличии). У которых между собой ничего общего, кроме таблицы-источника, нет. Причём каждый запрос возвращает строго одну запись. В таких условиях решение по объединению очевидно. CROSS JOIN.
SELECT *
FROM (
SELECT MAX(field1) field1
FROM table
) t1
CROSS JOIN (
SELECT field2
FROM table
ORDER BY field3 DESC LIMIT 1
) t2
;
Второй вариант
select
(select max(a) from tbl) as a,
b,
c
from tbl
order by c desc
limit 1
Решение с CROSS JOIN работает на 10% быстрее.
👉 Пишите ваше решение в комментариях👇
@sqlhub