Followers count

I want to put the number of followers and likes, can I use the Count() honestly?
6 Replies
Mykhailo
Mykhailo11mo ago
Hello, @melodyclue! count() us used to count rows. Followers and likes are columns?
melodyclue
melodyclueOP11mo ago
@solo I also want information about people I follow and like, so I store it in the JUNCTION TABLE. So by counting the number of records in the condition, that is the number of followers and likes
Mykhailo
Mykhailo11mo ago
Could you please show me your schema?
melodyclue
melodyclueOP11mo ago
I don't have full table but like this...
export const followers = mysqlTable("followers", {
userId: varchar("user_id", { length: 255 }).notNull(),
followerId: varchar("follower_id", { length: 255 }).notNull(),
})
export const followers = mysqlTable("followers", {
userId: varchar("user_id", { length: 255 }).notNull(),
followerId: varchar("follower_id", { length: 255 }).notNull(),
})
Mykhailo
Mykhailo11mo ago
what do you want to achieve with the query?
melodyclue
melodyclueOP11mo ago
i want users I followed

Did you find this page helpful?