how to make single sql query without using union for more than 2 sql statements ? : SELECT 'INITIALIZE' AS PROCESS_DESC,floor((Max(EXEC_DATE)-min(EXEC_DATE))*24) || ' HOURS ' || mod(floor((Max(EXEC_DATE)-min(EXEC_DATE))*24*60),60) || ' MINUTES ' || mod(floor((Max(EXEC_DATE)-min(EXEC_DATE))*24*60*60),60) || ' SECS ' time_difference FROM spool_table WHERE process_desc='INITIALIZE' AND to_date(EXEC_DATE, 'DD-MON-YYYY')= (select to_date(EXEC_DATE, 'DD-MON-YYYY')= from spool_table WHERE process_desc='INITIALIZE') UNION ALL SELECT 'PRELIM' AS PROCESS_DESC, floor((Max(EXEC_DATE)-min(EXEC_DATE))*24) || ' HOURS ' || mod(floor((Max(EXEC_DATE)-min(EXEC_DATE))*24*60),60) || ' MINUTES ' || mod(floor((Max(EXEC_DATE)-min(EXEC_DATE))*24*60*60),60) || ' SECS ' time_difference FROM spool_table WHERE process_desc='PRELIM' AND to_date(EXEC_DATE, 'DD-MON-YYYY')= (select to_date(Max(EXEC_DATE), 'DD-MON-YYYY') from spool_table WHERE process_desc='PRELIM')
