3 Question about sql.

wwchar 2003-10-17 08:43:51
pet(name, owner, species, sex, checkups, birth, death)

the number of pets of each species that each owner has.
the number of birds each owner has.
the total number of checkups each owner has made with all their pets.
...全文
35 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
wwchar 2003-10-20
  • 打赏
  • 举报
回复
pet(name,owner,species)
name:宠物名字
owner:所有者
species:宠物种类(鸟,狗....)
每个owner所拥有的鸟的数量。
关键是有些owner没有鸟,查询出来表中就没有该owner名字,
现在想要的结果最好能把没有鸟的owner,拥有鸟的数量是0,而不是不在表中出现。
wwchar 2003-10-20
  • 打赏
  • 举报
回复
就是想让没有鸟的owner显示0,
用纯sql行不行
ustb 2003-10-19
  • 打赏
  • 举报
回复
看了半天没有看到问什么?
不过像这样经典的数据库问题相信随便找本书也能搞定了。
wwchar 2003-10-17
  • 打赏
  • 举报
回复
更新一下:有几个问题已经解决。
每个owner拥有的鸟的数目,我想让没有鸟的owner显示0,不知道有没有办法。
feel8 2003-10-17
  • 打赏
  • 举报
回复
实在看不懂,在装金山词霸。。
wwchar 2003-10-17
  • 打赏
  • 举报
回复
The number of distinct species of pet each owner has.
the number of birds each owner has.
the total number of checkups each owner has made with all their pets.

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧