Я бы хотел сравнить, если в предложении where два столбца равны. Столбцы представляют собой два столбца из разных таблиц, которые были объединены
Это утверждение, которое я использую
SELECT authors.state, sum(qty*price)as sales_revenue
from authors,titles, stores, sales
WHERE authors.state = (SELECT stores.state from stores)
но я получаю сообщение об ошибке
M
sg 8120, Level 16, State 1, Line 1
Column 'authors.state' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.