问个ibatis的查询配置文件条件怎么写
select bassto ,count(bassto) from
(select distinct id,bassto from so where begintime>=#begintime# and endtime <=#endtime#) as tocx
group by bassto
sql语句如上,但是在(select distinct id,bassto from so where begintime>=#begintime# and endtime <=#endtime#)
中的where子句中还有些动态的查询条件不知道怎么去添加,数据库是DB2,请有经验的人给个例子,谢谢了