Followers count

I want to put the number of followers and likes, can I use the Count() honestly?
6 Replies
Mykhailo
Mykhailo14mo ago
Hello, @melodyclue! count() us used to count rows. Followers and likes are columns?
melodyclue
melodyclueOP14mo 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
Mykhailo14mo ago
Could you please show me your schema?
melodyclue
melodyclueOP14mo 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
Mykhailo14mo ago
what do you want to achieve with the query?
melodyclue
melodyclueOP14mo ago
i want users I followed

Did you find this page helpful?