Showing results for 
Search instead for 
Did you mean: 

Filter to prevent max records error

Filter to prevent max records error



We have created a query but it is generating an error as it is returning more than the maximum amount of records allowed.  Is there a way to add filters in dashboard to allow user to easily filter by periods and change to pull all data in multiple reports?


Also, I am trying to sum data to reduce the number of rows.  Can someone advise how to fix my query?


Select "installment_id",
SUM("subtotal") as 'Subtotal'
From "coyuchi_subscription_installment"
Where "status" = 'pending'
Limit 100


Don't panic, but we found an error with your query.
Could not run query: explain select "installment_id", sum("subtotal") as 'subtotal' from "coyuchi_subscription_installment" where "status" = 'pending' limit 100 .
ERROR: syntax error at or near "'Subtotal'" LINE 2: SUM("subtotal") as 'Subtotal' ^

Re: Filter to prevent max records error

HI @coyuchikt 

Make sure that installment_id is not the primary key in your table. I have created same table on my local instance with customer_id as well and run the following query. It runs fine for me.

Select customer_id,SUM(`subtotal`) as 'Subtotal' From coyuchi_subscription_installment Where `status` = 'pending' group by customer_id Limit 100

In your query may be single quote or double quote creating issue. Try the below one once or compare with my above query.

Select `installment_id`,
SUM(`subtotal`) as 'Subtotal'
From `coyuchi_subscription_installment`
Where `status` = 'pending'
Limit 100

I hope it will help you!