What is the best way to query 20 last "normal" pages items (the files that physically exit in the folder "/pages")?

I found such query to display 20 last pages, but the result includes also the tag pages that were dynamically created.
I want to display only “normal” pages and exclude everything that doesn’t physically exist in folder /pages.
What is the best way to achieve it?

{:title [:h3 "Recent 20 Pages"]
:query [:find (pull ?b [* {:block/_parent ...}])
:in $ ?end
[?b :block/updated-at ?v]
[(- ?end 30 * 24 * 60 * 60 * 1000 ) ?period]
[(>= ?v ?period)]
[(< ?v ?end)]
:inputs [:end-of-today-ms]
:result-transform (fn [result] (take 20
  (sort-by (comp - (fn [h]
    (get h :block/updated-at))) result)
) )

Welcome. Try [?b :block/file]

Thank you, it worked!

can you help me be specific where I can replace the previous code above with recommendation? Thanks!

Welcome. You don’t replace this code, you just add it in its own line, somewhere below :where, effectively telling Datalog to narrow the returned set of blocks to those that satisfy this condition as well, namely to have a file associated with them.

I understand you now. Thank you!