• you should post proper ddl statement,sample data and expected results,so that it will be easy to unserstand and give u some solution