The runQuery() function executes a query given as its argument directly in MindsDB.
runQuery()
Here is the syntax:
const query = `SELECT * FROM project_name.view_name`; const queryResult = await MindsDB.SQL.runQuery(query);