sql 分组查询语句
发布网友
发布时间:2022-04-13 10:17
我来回答
共2个回答
热心网友
时间:2022-04-13 11:47
这个很简单啊,就是四个表之间串一下,上sql
select A.NAME 影片名,B.RUNTIME 放映时间,C.TIME 订单时间,C.NUM 顾客编号
from FILM A,RUN B,ORDER C,RESERVATIONS D
WHERE D.TIME=C.TIME AND D.FMN=A.FMN AND A.FMN=B.FMN
试试吧
热心网友
时间:2022-04-13 13:05
select ORDER.顾客编号,
ORDER.TIME,
FILM.NAME,
RUN.RUNTIME
from ORDER,
RESERVATIONS,
FILM,
RUN
where ORDER.TIME = RESERVATIONS.TIME AND
RESERVATIONS.ID = FILM.ID AND
FILM.ID = RUN.ID;