Hi,
The following query is working fine to get last records of [tag_id=96], but now i want to get last 15 days records
where [tag_id=96]?
How to get records of last 15 days of [Tag_Id=96] ?
I'm using Oracle 11g.
SQL = " select * From (select tag_id,TAG_VAL, row_number()over(partition by TAG_ID order by CLOCK DESC) rn from T_PP_OPC_INPUT s1 where (TAG_ID >= 96 ) ) a where rn='1'";
My table structure following. RUN_ID STRING TAG_VAL STRING TAG_ID STRING CLOCK CLOCK
your early reply would be appreciable..
thanks in advance.