美文网首页
数据库——体育馆的人流量

数据库——体育馆的人流量

作者: 薛定谔与猫的故事 | 来源:发表于2018-04-26 09:16 被阅读0次
问题描述
select distinct(a.id),a.date,a.people
from stadium as a,stadium as b, stadium as c
where a.people>=100 and b.people>=100 and c.people>=100
and ((a.id-b.id=1 and b.id-c.id=1) or(b.id-a.id=1 and a.id-c.id=1) or(c.id-b.id=1 and b.id-a.id=1))
order by a.id

相关文章

网友评论

      本文标题:数据库——体育馆的人流量

      本文链接:https://www.haomeiwen.com/subject/njqplftx.html