For my homework, I have to enter example queries from the book to sql. There are also example database I downloaded for the homework and properly put them into SQL. The following is what I have to put in but an error message comes up.
SELECT V_CODE, V_NAME, V_STATE, P_CODE, P_DESCRIPT, P_PRICE * P_QOH AS TOTAL
FROM PRODUCT P JOIN VENDOR V ON P.V_CODE = V.V_CODE
WHERE V_STATE IN ('TN','KY')
ORDER BY V_STATE, TOTAL DESC;
--Total value of products from Tennessee and Kentucky
Ambiguous column name 'V_CODE'
Not sure how to fix.
I had to put in an example query from the homework but an error message comes up.
"Ambiguous column name 'V_CODE'"