Simple-Query syntax to only show the first match?

Hi, for the life of me I can’t find the info. I am absolutely sure I’ve seen the answer in the forums. I want to have a simple query and limit the results to First. How was it? :face_with_diagonal_mouth:

Maybe you mean this:

:result-transform (fn [result] (take 1 result) )
1 Like

I remember it was a Simple Query thing but maybe I am mistaken… it was something with “Select 1” or “First 1” or something …

(sample 1) does that.

sample seems to return random matches.

1 Like

I was sure I saw this in one of the threads I was involved in. Now I found it :slight_smile:

Regarding the randomness, that could be because there is no sorting specified with Simple Queries and it is possible that each time the query runs it gets the result in a different order? I wouldn’t expect this behavior and haven’t noticed if but until I will bite the bullet and start learning complex queries this works fine for my situation.

How to limit the number of results in advance query?

1 Like