So, here's one possible answer.
Inside these parentheses,
is a select statement that
returns the average weight.
We call this table subQ,
because SQL makes us give it some name,
even though we don't use that name.
And then we're joining that
back to player's table, and
then doing a where restriction for
rows where the player's weight,
is less than the computed average.
Let's look at that in more detail.
First, start with the sub query.
It does an average aggregation.
Producing this little one
by one table called a subq.
Then, that gets joined
to the players table.
Making this one.
This then gets filtered, for entries
where weight is less than average.
Finally, we just take the name and
the weight columns.
.حسنًا، إليك إحدى الإجابات المحتملة
داخل هذين القوسين، توجد
عبارة select
.والتي تعرض متوسط الوزن
،نسمي هذا الجدول subQ
،لأن SQL تطلب منا تسميته
.حتى وإن كنا لا نستخدم ذلك الاسم
ثم نقوم بربط جدول subQ
بجدول اللاعبين
فيتم إنشاء قيد where
،للصفوف التي يقل فيها وزن اللاعب
.عن المتوسط المحتسب
.دعونا ننظر إلى هذا بمزيد من التفصيل
.أولاً، ابدأ بالاستعلام الفرعي
.يقوم بإنشاء متوسط aggregation
يتم إنشاء
.هذا الجدول الصغير المكون من عمود واحد ويُسمى subq
بعد ذلك، يتم ربط هذا
.بجدول اللاعبين
.مما يؤدي إلى إنشاء هذا الجدول
يتم بعد ذلك تصفية هذا الجدول، للإدخالات
.التي يقل فيها الوزن عن المتوسط
وأخيرًا، نحصل على عمودي الاسم
.والوزن فقط
Aqui esta é uma resposta possível.
Entre parênteses
está uma instrução select que
retorna o peso médio.
Chamamos essa tabela de subQ
porque o SQL nos faz dar algum nome para ela,
embora não usemos esse nome.
E depois vamos uni-la
de volta com a tabela de jogadores e
criar uma restrição onde para
as linhas onde o peso do jogador
é menor que uma média computada.
Vamos ver isso de uma forma mais detalhada.
Primeiro, comece com uma subconsulta.
Ela cria uma agregação média.
Produzindo essa pequena tabela uma
por uma chamada subq.
Depois ela é unida
com a tabela de jogadores.
Criando esta aqui.
Depois ela é filtrada, em busca de entradas
onde o peso é menor que uma média.
Finalmente, pegamos apenas as colunas nome e
peso.
这是一个可能的回答
在这些括号里
有一个 select 语句 它返回平均体重
我们把这个表格命名为 subQ 因为 SQL 可让我们给表格起名
即使我们并不使用那个名称
之后 我们把它与选手表格进行连接
然后使用 where 限制返回的行数
其中的选手体重 低于计算出来的平均值
让我们更详细地讨论这个问题
首先 以子查询开始
它进行求取平均数的聚合操作
一步步地得出这个名为 subq 的表格
然后 将它与选手表格进行连接
成为这个
这个表格对体重低于平均值的记录进行筛选
最后 我们只需要名字和体重列