Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.
SELECT distinct decode(question_answer.callout_id, '29','JFO','30','NPSC'), RGSN.DSTR_NR, RGSN.RGSN_ID, SUBST.SUBST_TYPE_CD, trunc(SUBST.RCVD_DT), subst.long_desc, t.last_nm FROM RGSN, SUBST, question_answer, rgsn_sts, rgst t WHERE ( RGSN.DSTR_NR=SUBST.DSTR_NR and RGSN.RGSN_ID=SUBST.RGSN_ID ) AND ( RGSN.DSTR_NR=T.DSTR_NR and RGSN.RGSN_ID=T.RGSN_ID ) and (rgsn.dstr_nr = question_answer.dstr_nr and rgsn.rgsn_id = question_answer.rgsn_id) and (rgsn.dstr_nr = rgsn_sts.dstr_nr and rgsn.rgsn_id = rgsn_sts.rgsn_id) and ( RGSN.DSTR_NR = 4085 AND RGSN.RGSN_ID IN (393930088, 411308940, 411330955, 450388835, 500105199 ) //MY PROBLEM WITH THE CODE IS HERE! and SUBST.SUBST_TYPE_CD in ('DHAPCALC','DHAPAGRMT','DHAPPIINOTE','RECREQ')) and SUBST.RCVD_DT = (select max(rcvd_dt) from subst where rgsn_id = rgsn.rgsn_id and SUBST_TYPE_CD in ('DHAPCALC','DHAPAGRMT','DHAPPIINOTE','RECREQ'))
|Dcount using a date in a table compared to today's date||3||34|
|SQL Server 2012 r2 - Sum totals||2||28|
|Oracle Query - Return results based on minimum value||8||35|
|LAG_ROWID - how do I get the right order using this query?||2||15|