Home > Back-end >  Please help me with the query . Details have been added already
Please help me with the query . Details have been added already

Time:04-05

Table is enter image description here

Result should be enter image description here

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
  • Related