sqlzoo刷题笔记-07 | The JOIN operation

这篇博客详细记录了在SQLZoo上关于JOIN操作的练习,包括查询德国队进球信息、特定比赛详情、德国队所有进球详情、球员Mario的进球记录、前10分钟进球情况、'Fernando Santos'作为教练的比赛、华沙国家体育场进球球员、对战德国进球球员、各队总进球数、各体育场进球数以及涉及波兰和德国进球的比赛信息。通过这些例子,深入理解SQL中的JOIN操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

网址:https://sqlzoo.net/wiki/The_JOIN_operation

 

1、show the matchid and player name for all goals scored by Germany. To identify German players, check for: teamid = 'GER'

显示德国队进球对应的matchid 和 player

SELECT matchid, player 
FROM goal 
WHERE teamid = 'GER'

2、Notice in the that the column matchid in the goal table corresponds to the id column in the game table. We can look up information about game 1012 by finding that row in the game table.

Show id, stadium, team1, team2 for just game 1012

在game表中查询赛事1012对应的 id, stadium, team1, team2

SELECT id,stadium,team1,team2
FROM game
WHERE id = '1012&
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值