Getting error while trying to run a simple select hive query with order by clause

Viewed 20

Hey folks i am pretty new to hive and trying out simple hive queries my table contains 3 columns id,name,address with the following data in it

+---------------+-----------------+--------------------+--+
| customers.id  | customers.name  | customers.address  |
+---------------+-----------------+--------------------+--+
| 111           | john            | wa                 |
| 222           | emily           | wa                 |
| 333           | rick            | wa                 |
| 444           | jane            | ca                 |
| 555           | amit            | nj                 |
| 666           | nina            | ny                 |
+---------------+-----------------+--------------------+--+```

I'm getting error while running the below query

 select id from customers  order by address;

Error while compiling statement: FAILED: SemanticException [Error 10004]: Line 1:34 Invalid table alias or column reference 'address': (possible column names are: id)

Thanks for the help in advance

0 Answers
Related