A mistake that I have made!<p>And the answer is:<p><pre><code> UPDATE TABLE posts
SET views = views + 1
WHERE post_id = $1
RETURNING views;
@app.post("/view/{post_id}")
async def view_post(post_id: int):
await Post.filter(id=post_id).update(views=F("views") + 1)
post = await Post.filter(id=post_id).get()
return {"current_views": post.views}</code></pre>