oracle11g - SQL query to find How many employees joined in one week -


i tried following

select count(emp_id),emp_jn_dt employee emp_jn_dt between '01-nov-2014' , '07-nov-2014' group emp_jn_dt) order emp_jn_dt ;

but sir asked if enter data dynamically?

i have no clue on this. plz me out thank you.

it doesn't matter data enter dynamically emp_in_dt must system.datetime.now if u want select last week records u should pass 2 dates 1st date should system.datetime.now , 2)datetime d=system.datetime.now.adddays(-7) i.e d

try , if find difficulty or need more clarification please let me know


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -