Hi @wadhah ,
The 10000 records limit in es-sql causes hindrance, if you are pulling the entire record set in SQL and aggregating on the 'Display' tab . Instead you can use aggregate functions within the SQL.
In your case you can use the below SQL:
SELECT SUM(Costs) AS sum FROM \"test*\" WHERE Costs IS NOT NULL
This is is equivalent to using the 'exists' filter on discover tab.