count(cl.user_id) as achieved,
round(((cast(count(cl.user_id) as decimal(2))/he.lead_target)*100)) as val
from crm_lead cl,
where cl.type='opportunity' and rr.id=he.resource_id and
rs.id=rr.user_id and rs.id=cl.user_id and date_open>='%s' and date_open<=date_open + interval '7 days'
group by he.name_related, he.lead_target
""" %(form['start_date'])------------------>i am passing only start date i need to get the interval date as a end date, above query is working fine <blocktable colwidths="530.00" style="table1">
<para style="terp_tblheader_Details">Date from: [[ data['form']['start_date'] ]] to [[here how to get the end date from the start of perticular interval]]</para>
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 5/8/13, 1:41 AM|
|Seen: 600 times|
|Last updated: 3/16/15, 8:10 AM|