Click here to Skip to main content
15,902,112 members

Comments by rohith kallingal (Top 5 by date)

rohith kallingal 13-Jul-15 5:43am View    
yaa i tried it also.. but i think the issue is current week dates are included in lastmonth dates.how can i write current week condition in separate case?
rohith kallingal 13-Jul-15 1:21am View    
sql = "with t as\
( SELECT cwd_group_par.id as project\
, cwd_group_par.group_name as project_name\
, case \
when TO_CHAR(chgroup.created,'YYYY-MM-DD') >= '" + str(lastmonth_firstdate) + "' AND TO_CHAR(chgroup.created,'YYYY-MM-DD') <= '" + str(lastmonth_lastdate) + "' then 'LASTMONTH_COUNT'\
when TO_CHAR(chgroup.created,'YYYY-MM-DD') >= '" + str(currentweek_startdate) + "'AND TO_CHAR(chgroup.created,'YYYY-MM-DD') <= '" + str(currentweek_enddate) + "' then 'CURRENTWEEK_COUNT'\
\
end as tm\
, count(distinct i.id) cnt\
from jira.jiraissue i\
join jira.cwd_membership cwd_mem on i.assignee = cwd_mem.lower_child_name\
join jira.cwd_group cwd_group_par on cwd_group_par.lower_group_name = cwd_mem.lower_parent_name\
join jira.issuestatus on i.issuestatus = jira.issuestatus.id\
JOIN jira.PROJECT ON i.PROJECT = jira.PROJECT.ID \
join jira.changegroup chgroup on i.id = chgroup.issueid\
join jira.changeitem chitem on chgroup.id = chitem.groupid \
where cwd_group_par.id in("+str(group_details)+"\
)\
and issuestatus in (6 \
)\
AND jira.PROJECT.PKEY = 'ISD'\
AND chitem.field = 'status' and to_char(chitem.newstring) in ('Closed')\
\
group by cwd_group_par.id, cwd_group_par.group_name\
, case \
when TO_CHAR(chgroup.created,'YYYY-MM-DD') >= '" + str(lastmonth_firstdate) + "' AND TO_CHAR(chgroup.created,'YYYY-MM-DD') <= '" + str(lastmonth_lastdate) + "' then 'LASTMONTH_COUNT'\
when TO_CHAR(chgroup.created,'YYYY-MM-DD') >= '" + str(currentweek_startdate) + "'AND TO_CHAR(chgroup.created,'YYYY-MM-DD') <= '" + str(currentweek_enddate) + "' then 'CURRENTWEEK_COUNT'\
\
end \
)\
select * from t\
pivot\
( sum(cnt) as wk\
for tm in ('LASTMONTH_COUNT','CURRENTWEEK_COUNT')\
)\
order by 1;"
rohith kallingal 9-Jul-15 7:36am View    
now i am updated the query. is it ok?
if you have dbvisualizer tool you can run the query there.
rohith kallingal 10-Apr-15 3:45am View    
I need to change data in one directory that need to dynamically populate another directory with this data.
rohith kallingal 10-Apr-15 3:43am View    
Deleted
I need to change data in one directory that will dynamically populate another directory with this data.