The query you were running (with a minor syntax error, hence the error message) is what we call a “Built-in Query”: https://docs.tigergraph.com/start/gsql-examples/common-applications#built-in-queries
Built-in Queries are not GSQL; they are very SQL-like, but also limited in capability. They provide a handy way to select and inspect the vertices and edges that are in the database. They are not for graph traversal or analytics or transactions.
The specific error: You can only select edges if you specific a single source vertex using the clause
Note, however, that running built-in queries is unrelated to whether you are in the GSQL interactive console or not. For example, if you in a Linux shell, you can run a built-in query the same way you would run a GSQL command, but enclosing it in quotes (or by naming a file containing your commands).
Linux> gsql -g MyGraph 'SELECT count(*) FROM Person'
Linux> gsql -g MyGraph 'RUN QUERY pageRank(<parameters>)'