Table is
Result should be
Please tell me how to solve this query. hive> select * from xyz; OK xyz.col1 xyz.col2 xyz.col3 NULL b c a NULL c a b NULL Time taken: 0.165 seconds, Fetched: 3 row(s)
CodePudding user response:
SELECT MAX(COL1)AS COL1,MAX(COL2)AS COL2,MAX(COL3)AS COL3
FROM YOUR_TABLE