D. Romanski D. Romanski - 6 months ago 14x
SQL Question

Same SQL not ending properly

I am having trouble with the same ORA-00933. My code is below:

SELECT cu.customername
FROM customer cu
WHERE cu.customerid = salestranscation.customerid AND
salestransaction.tid = soldvia.tid AND
soldvia.productid = product.productid
product.productprice >= 150;

Essentially I am trying to collect the customers who bought product greater than or equal to 150.



I think you are missing AND in where clause Your query should be:

SELECT cu.customername
FROM customer cu
inner join salestranscation on cu.customerid = salestranscation.customerid
inner join soldvia on salestransaction.tid = soldvia.tid
inner join product on soldvia.productid = product.productid
product.productprice >= 150;