Cannot read property 'data' of undefined (Google Sheets)

I was trying to fetch all rows of delivered orders from a google sheet that has e commerce orders, I used a Query JSON with SQL and it produced “Cannot read property ‘data’ of undefined (Google Sheets)”
here is the query:
SELECT *
FROM {{query1.data}}
WHERE query1.data.Status = “Pending”;
query1 only lists all the data in the spreadsheet.
I am still a bit new to mysql and I don’t know where is the mistake, using mysql or using retool itself.
Thanks!

Two guesses:
First - in the "where" clause, try only "Status" instead of "query1.data.Status"
Second - surround "query1.data.Status" with brackets ({{}}) in the where clause
I haven't had just that issue, so I'm not 100% sure that any of these approaches will solve your problem - a disclaimer :slight_smile:

You'll definitely need to enclose query1.data.Status in brackets, like {{ query1.data.Status }}. Thanks for chiming in @daniel-andersson :grinning: