Using "select" in sql (oracle), failed to fetch

0

I have to solve the following question:

  

1.CONSULT THE NAME (DESCRIPTION) OF THE PRODUCTS ACQUIRED BY HOOPS AND GOOD SPORT CLIENTS IN 1990.

The command used for the search was:

select p.DESCRIPTION 
from PRODUCT p, SALES_ORDER s, ITEM i, CUSTOMER c
where c.NAME = "HOOPS" 
  and s.ORDER_DATE like "%90" 
  and c.COSTUMER_ID = s.COSTUMER_ID 
  and s.ORDER_ID = i.ORDER_ID 
  and i.PRODUCT_ID = p.PRODUCT_ID;

And I got the following error: ERROR on line 1:

  

ORA-00904: "S". "COSTUMER_ID": Invalid identifier

The diagram used has been tested and has the necessary FKs.

DIAGRAM:

    
asked by anonymous 30.08.2017 / 06:24

1 answer

0
select 
    p.DESCRIPTION 
from PRODUCT p
inner join ITEM i on i.PRODUCT_ID = p.PRODUCT_ID
inner join SALES_ORDER s on s.ORDER_ID = i.ORDER_ID 
inner join CUSTOMER c on c.COSTUMER_ID = s.COSTUMER_ID
where c.NAME = "HOOPS" 
and s.ORDER_DATE like "%90";
    
30.08.2017 / 13:26