I am trying to use the value retuned by count in the update statement. But getting the syntax error. Subqueries are working. But the update query is not working. What change is required to get the correct result?
update Items set numberOfBids = count (select * from Bids where id ='1673078805') where id='1673078805';
Error: near "select": syntax error
sqlite> select * from Bids where id ='1673078805';
1673078805|brettgodfrey|14.52|2001-12-05 10:40:41
1673078805|gardnerstoys|15.04|2001-12-06 07:40:41
1673078805|tallulahbankhead|14.01|2001-12-04 13:40:41
1673078805|tgrhino@home.com|15.55|2001-12-07 04:40:41
1673078805|yesterdaysgem|16.06|2001-12-08 01:40:41
sqlite> update Items set numberOfBids = 5 where id='1673078805';
Move the count into the subquery: