ORA-00933: SQL command not properly ended
Your syntax for using the database link is incorrect, you've got the link and table identifiers in the wrong order.

It should be:

select ... from table_name@db.link.name


Having too many . in a table name results in an ORA-00933 error, like you're getting.