Notice: file_put_contents(): Write of 18145 bytes failed with errno=28 No space left on device in /var/www/tgoop/post.php on line 50
Proglib.academy | IT-курсы@proglib_academy P.2792
PROGLIB_ACADEMY Telegram 2792
📊 Как СУБД на самом деле выполняет SQL-запрос

Когда Вы пишете SQL-запрос, может показаться, что всё выполняется сверху вниз — SELECT, FROM, WHERE…
Но это не так. Под капотом запрос исполняется в совершенно другом порядке:

FROM — сначала выбирается основная таблица

JOIN — затем к ней присоединяются другие таблицы

ON — указывается, как именно таблицы связываются

WHERE — происходит фильтрация строк до группировки

GROUP BY — строки группируются по указанному полю

HAVING — фильтрация уже сгруппированных данных

SELECT — выбираются нужные столбцы

ORDER BY — сортировка результата

LIMIT — ограничение количества строк

Обратите внимание: оператор SELECT выполняется почти в самом конце, а WHERE работает до GROUP BY. Именно поэтому нельзя ссылаться в SELECT на столбцы, которых нет в GROUP BY или агрегатах.

🔵 Собрали полезные материалы для старта в целый курс → «Основы IT для непрограммистов»

Proglib Academy #буст
Please open Telegram to view this post
VIEW IN TELEGRAM
👍31



tgoop.com/proglib_academy/2792
Create:
Last Update:

📊 Как СУБД на самом деле выполняет SQL-запрос

Когда Вы пишете SQL-запрос, может показаться, что всё выполняется сверху вниз — SELECT, FROM, WHERE…
Но это не так. Под капотом запрос исполняется в совершенно другом порядке:

FROM — сначала выбирается основная таблица

JOIN — затем к ней присоединяются другие таблицы

ON — указывается, как именно таблицы связываются

WHERE — происходит фильтрация строк до группировки

GROUP BY — строки группируются по указанному полю

HAVING — фильтрация уже сгруппированных данных

SELECT — выбираются нужные столбцы

ORDER BY — сортировка результата

LIMIT — ограничение количества строк

Обратите внимание: оператор SELECT выполняется почти в самом конце, а WHERE работает до GROUP BY. Именно поэтому нельзя ссылаться в SELECT на столбцы, которых нет в GROUP BY или агрегатах.

🔵 Собрали полезные материалы для старта в целый курс → «Основы IT для непрограммистов»

Proglib Academy #буст

BY Proglib.academy | IT-курсы




Share with your friend now:
tgoop.com/proglib_academy/2792

View MORE
Open in Telegram


Telegram News

Date: |

Hui said the messages, which included urging the disruption of airport operations, were attempts to incite followers to make use of poisonous, corrosive or flammable substances to vandalize police vehicles, and also called on others to make weapons to harm police. Don’t publish new content at nighttime. Since not all users disable notifications for the night, you risk inadvertently disturbing them. Deputy District Judge Peter Hui sentenced computer technician Ng Man-ho on Thursday, a month after the 27-year-old, who ran a Telegram group called SUCK Channel, was found guilty of seven charges of conspiring to incite others to commit illegal acts during the 2019 extradition bill protests and subsequent months. Today, we will address Telegram channels and how to use them for maximum benefit. Commenting about the court's concerns about the spread of false information related to the elections, Minister Fachin noted Brazil is "facing circumstances that could put Brazil's democracy at risk." During the meeting, the information technology secretary at the TSE, Julio Valente, put forward a list of requests the court believes will disinformation.
from us


Telegram Proglib.academy | IT-курсы
FROM American