This is your second interview question today: at least this is slightly more complicated than your first one.
To fetch data based on dates can anyone help me with this...and he gave me the INPUT and OUTPUT too[
^]
You are not ready for this job, and our giving you the solutions to them all helps no-one - not you, who will be out of his depth as soon as the interviewer asks about the detail; the company that might employ you on the basis of our knowledge rather than yours; or the applicants that can do the job which you might displace by this blatant cheating.
Learn your subject, apply for jobs you can do: or you are setting yourself up for a fall.