nvl(actual_draw,0) as actual,
nvl(projection,0) as projection
where drive_date between '01-aug-2014' and '31-aug-2014'
and area_rep_no = 11
and drive_cancelled is null
order by drive_date
The user does not want to put the date range as I have shown, but they want a parameter like Aug 2014, Sep 2014.... etc.
where drive_date = Aug 2014 ( this comes from a list)
Once the user chooses value then I have to translate that value to 1st day of the month and last day of the month.
1. I want to know how to get sql to get list of month and year
2. based on the value chosen translate to 1st day of the month and last day of the month.
3. Based on actual and projection I need to give % efficiency ( how did the drive perform) as one column next to projection.