I HAVE EMP TABLE, 4 COLS R THERE COL1,COL2,COL3,COL4
ID-- 101,102,103,104 SAL-- 1000,4000,2000,5000
DATE-- COLUMN. I WANT TO DISPLAY THE DATA PREVIOUS MONTH
HIGEST SAL ?

Answer Posted / indu

select max(sal) from emp where to_char(Date,'MM-YYYY')
=to_char(dateadd(month, -1, GETDATE()),'MM-YYYY');

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you highlight the main features of ibm infosphere information server?

642


What are some different alternative commands associated with "dsjob"?

666


Explain connectivity between datastage with datasources?

605


What is process model?

1558


How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?

1705






How do you import and export data into datastage?

707


How do you generate sequence number in datastage?

628


Define APT_CONFIG in Datastage?

668


What is job control?

624


How rejected rows are managed in datastage?

928


What are the processing stages?

648


What are the types of containers and how to create them?

562


what is the use of skid in reporting?

1961


Name the third party tools that can be used in datastage?

620


Differentiate between Symmetric Multiprocessing and Massive Parallel Processing?

633