-- #df:entity#

-- !df:pmb extends SPB!
-- !!Date fromRequestedTime:fromDate!!
-- !!Date toRequestedTime:toDate!!

/*IF pmb.isPaging()*/
select
-- ELSE select count(*) from (select
/*END*/
  SEARCH_WORD as name
 from SEARCH_LOG 
 /*BEGIN*/where
   /*IF pmb.fromRequestedTime != null*/
   REQUESTED_TIME >= /*pmb.fromRequestedTime*/'2009-10-26 00:00:00'
   /*END*/
   /*IF pmb.toRequestedTime != null*/
   and REQUESTED_TIME < /*pmb.toRequestedTime*/'2009-10-30 00:00:00'
   /*END*/
   and HIT_COUNT != 0
 /*END*/
 group by SEARCH_WORD
/*IF pmb.isPaging()*/
 order by count(SEARCH_WORD) desc
-- ELSE ) as fc
/*END*/
