Filter users that aren’t in server - SQLITE

I’m using SQLITE for a points system and I have a leaderboard command but I need to know how to filter out users that aren’t in the server.

Giving examples of your code would help us help you more

Add a where statement after your select statement. I’m not very good at SQL but I think it’s something in the form

Select Statement
where username=something or username=something

@thewilloftheshadow
here is the select statement: const top10 = sql.prepare("SELECT * FROM scores WHERE guild = ? ORDER BY points DESC LIMIT 10;").all(message.guild.id);

@glitch_support can you please help

never mind I fixed it with this:
if (g.member(data.user)) {
embed.addField(user, ${datapoints} XP (Level ${data.level}));

}