Postgres node - executing sql queries and returning all data

When using the Postgres node in n8n with the Execute Query operation, I want to retrieve all rows from my table where session_id matches and created_at is within the last 25 minutes. However, the node only returns one row, even though running the same query directly in Supabase returns multiple rows.

What is the error message (if any)?

There is no error message, but the node only returns one row instead of all matching rows.

Please share your workflow


## The query I used in the Execute Query operation

SELECT * FROM n8n_chat_historiess
WHERE session_id = ‘zyhfff’
AND created_at > NOW() - INTERVAL ‘25 minutes’
ORDER BY created_at DESC;


## Information on your n8n setup

* **n8n version:** 1.105.0
* **Database (default: SQLite):** (Supabase)
1 Like

I’m having this problem also. The query result just shows success: true instead of the table data. I cannot do this query with the SELECT operation because it’s a query with a complicated join.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.