Have a products table with item_id and color_id. I\'m trying to get the color_id with the most non-null instances.
This fails:
SELECT color_id
To make it simple, use in built function in Oracle(Works only with Oracle Database 11g+ version) :
select stats_mode(color_id) from so_test
This would return highest occurrence of colour ids.