Make a method to extract the SQL alias for an inline view

Change-Id: I507abd3c2c17013dd97f1c294ea11e60f80e964e
support optional "as" in inline views

Change-Id: Ic5a11d18e968031ac70397cee5e5481cb0ba9d70