Followers count

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