我正在處理Oracle中的SQL賦值。有兩張桌子。關於連接表的SQL賦值
table1中被稱爲Person10:
領域包括:身份證,FNAME,LNAME,州衛生署,JOBTITLE,工資,貓。
表2被稱爲將stateInfo:
領域包括:國家,Statename的,資本,暱稱,Pop2010,POP2000,pop1990,sqmiles。
問:
Create a view named A10T2 that will display the StateName, Capital and Nickname of the states that have at least 25 people in the Person10 table with a Cat value of N and an annual salary between $75,000 and $125,000. The three column headings should be StateName, Capital and Nickname. The rows should be sorted by the name of the state.
我有什麼:
CREATE VIEW A10T2 AS
SELECT StateName, Capital, Nickname
FROM STATEINFO INNER JOIN PERSON10 ON
STATEINFO.STATE = PERSON10.STATE
WHERE Person10.CAT = 'N' AND
Person10.Salary in BETWEEN (75000 AND 125000) AND
count(Person10.CAT) >= 25
ORDER BY STATE;
它給了我一個錯誤說缺少表達。我可能需要一個團體的表達......但我不知道我做錯了什麼。
請問您可以發佈詳細的錯誤消息嗎? – Dresden