// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.esql.query({
  query:
    '\n    FROM library\n    | EVAL year = DATE_EXTRACT("year", release_date)\n    | WHERE page_count > ?page_count AND author == ?author\n    | STATS count = COUNT(*) by year\n    | WHERE count > ?count\n    | LIMIT 5\n  ',
  params: [
    {
      page_count: 300,
    },
    {
      author: "Frank Herbert",
    },
    {
      count: 0,
    },
  ],
});
console.log(response);
----
