Yes, it worked. Thank you so much for helping me. @elithrar I leave the code here, maybe someone ne

Yes, it worked. Thank you so much for helping me. @elithrar
I leave the code here, maybe someone needs it
export interface Env {
  DB: D1Database;
}

export default {
  async fetch(request: Request, env: Env) {
      const stmt = env.DB.prepare(`SELECT time FROM (SELECT time, count(*) as cnt FROM accesslog WHERE ip = ?1 GROUP BY time) WHERE cnt >= 3`).bind("81.213.254.29");
      const results = await stmt.all();
      return Response.json(results);
  },
};
Was this page helpful?