我們有兩個表。關於每個用戶的收藏作者的sql查詢
1. information
title body name
title1 body1 author1
title2 body2 author1
title1 body1 author2
title1 body1 author3
2. interactions
name favorited user_favorited_by
author1 yes user1
author2 yes user1
author1 yes user2
author1 no user3
問題是:誰爲每個用戶最喜歡的作者?
查詢應該給我們基於示例如下回答:
user1 author1
user1 author2
user2 author1
任何幫助表示讚賞。
兩點減號?爲什麼?你可以在這裏發表評論。我認爲問題很清楚! – stefanosn