Hi All,
My data is given as below:
Table Name: TripDetails
Tripnum Zone ShipDate Item
123 AB0 14-OCT-2016 Item 1
123 AB0 14-OCT-2016 Item 2
124 AB1 14-OCT-2016 Item2
NULL AB2 14-OCT-2016 Item3
NULL NULL 14-OCT-2016 Item4
Now my requirement is I want to GROUP BY Tripnum if TRIPNM is NOT NULL. If TripNUM is NULL THEN GROUP BY ZONE but excluding NULL ZON. If TRIPNUM and ZONE both are NULL THEN GROUP BY SHIPDATE.