I have a table which consists of eight column such as A,B,C,....H. Each column have some shortcodes such as U,V,W randomly.Now I need to count the no of U,V,W from each row.Some columns may have null or unknown value also.
Here is a demo:
Here I need to use HiveQL.
@PRIYATAM SAHA hm, I'm not sure if this is possible with SQL at all, since SQL works on a column basis. You could try reading the dataset into Apache Spark and then counting the values in the matrix like that. Check this question which seems similar to yours: https://stackoverflow.com/questions/31562825/spark-scala-how-to-count-values-in-rows
You load the table into Spark using a HiveContext and then you can work on it using Spark functions. Try that out perhaps and let us know how you get on.