0
liked_table
-----------
user_id | topic | liked
2 | 3 | 1
3 | 3 | 1
5 | 3 | -1
topics_table
------------
topic_id | likes
3 | count(liked field from liked_table where topic from liked_table is this row's topic_id)
我可以像在Excel中一样在MySQL中编写这样的公式吗?将表中的数字反映到字段中(MySQL)