Мой вопрос:
List the performance description, date, time and venue of performances such
that for each one of the performances, there exists another performance
with the same date and time but performed in a different venue.
Я думаю, единственная таблица, которую нужно использовать:
CREATE TABLE PERFORMANCE (
PerformDateTime timestamp NOT NULL,
Venue VARCHAR2(75),
PerformDesc VARCHAR2(75),
constraint PERFORMANCE_PKEY primary key (PerformDateTime, Venue)
);
Я пробовал следующие операторы SELECT:
SELECT PerformDesc,PerformDateTime,venue FROM PERFORMANCE
WHERE PerformDateTime IN (SELECT PerformDateTime FROM PERFORMANCE GROUP BY venue);
И
SELECT PERFORMANCE.PerformDesc,PERFORMANCE.PerformDateTime,PERFORMANCE.venue
FROM PERFORMANCE GROUP BY (PERFORMANCE.PerformDateTime);
В обоих этих утверждениях есть ошибка:
ERROR at line 1:
ORA-00979: not a GROUP BY expression
Хотелось бы помочь!