Followers count

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