F
Filament11mo ago
torriv

Sushi and Summarize()

When i try to use summarize() on a widget table, where the data comes from sushi, i get this error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '":memory:"."ynabs" where (strftime('%Y-%m-%d', "month") <= cast(? as text) and "' at line 1
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '":memory:"."ynabs" where (strftime('%Y-%m-%d', "month") <= cast(? as text) and "' at line 1
And this is the entire query:
select avg(ynabs.income) as "FvnTYOZTDbRgyL9O" from (select * from ":memory:"."ynabs" where (strftime('%Y-%m-%d', "month") <= cast(2023-08-20 as text) and "month" >= 2022-08-20 21:24:22)) as `ynabs`
select avg(ynabs.income) as "FvnTYOZTDbRgyL9O" from (select * from ":memory:"."ynabs" where (strftime('%Y-%m-%d', "month") <= cast(2023-08-20 as text) and "month" >= 2022-08-20 21:24:22)) as `ynabs`
Anyone know how to fix this?
1 Reply
cheesegrits
cheesegrits11mo ago
I suspect summaries may not work with Sushi. Iirc, summaries build direct DB queries rather than going thru Eloquent, for performance reasons. And I'm pretty sure direct DB queries won't work for Sushi's sqlite handling under the hood.