DEFINE(
SQL,
LAMBDA(
table,
query,
LET(
first_word,
FIRSTWORD(query),
rest_of_query,
TRIM(
TEXTAFTER(
query,
first_word)),
SWITCH(
first_word,
"select",
SELECT(
table,
rest_of_query),
OTHERWISE,
table))))
Help us optimize this function