Replies: 3 comments 1 reply
-
You should be able to just put the If that doesn't work there's likely something wrong in |
Beta Was this translation helpful? Give feedback.
-
Oh, I newer tried drift files because the doc says But now I run into another problem:
This is the SQL: CREATE VIEW IF NOT EXISTS booking_list_filters AS
SELECT JSON_ARRAY(GROUP_CONCAT(DISTINCT JSON_OBJECT('companyid', companies.companyid, 'companydb', companies.companydb, 'companyname', companies.firstname || ' ' || companies.lastname))) AS "companies",
JSON_ARRAY(GROUP_CONCAT(DISTINCT JSON_OBJECT('projectid', projects.projectid, 'projectdb', projects.projectdb, 'projectname', projects.projectname))) AS "projects",
JSON_ARRAY(GROUP_CONCAT(DISTINCT JSON_OBJECT('eventtypeid', event_types.eventtypeid, 'eventname', event_types.name))) AS "events"
FROM companies
INNER JOIN projects ON companies.companyid = projects.companyid AND companies.companydb = projects.companydb
INNER JOIN events ON projects.projectid = events.projectid AND projects.projectdb = events.projectdb
INNER JOIN event_types ON event_types.eventtypeid = events.eventtypeid; |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, it works :-) |
Beta Was this translation helpful? Give feedback.
-
I have this SQL and want to create a
View
from it:Would it be possible to implement something like
customSelect
forView
s?Beta Was this translation helpful? Give feedback.
All reactions