get_sql

* get_sql handles invalid mv_id and non-defined mv
* tests for get_sql
* re-sorted tests