text to sql syntaxThu, 29 Feb 2024

UPDATE books SET sales_1999 > (SELECT SUM(qty * price) FROM sales WHERE sales.book_id = books.id AND sales.date BETWEEN '01/01/1999' AND '12/31/1999') Какая ошибка в этом запросе?

E books SET sales_1999 > (SELECT SUM(qty * price) FROM sales WHERE year = 1999); The problem is that the subquery is not correlated to the outer query. The subquery is executed for every row in the outer query, and the result is then compared to the value in the outer query. This is not what you want. You want to compare the value in

Want to kickstart your project?Use the new AI Studio to create your code