NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

select a.sen,a.pres_judge,sum(CASE WHEN b.count1 is null THEN 0 ELSE b.count1 END+CASE WHEN c.count2 is null THEN 0 ELSE c.count2 END+CASE WHEN d.count3 is

null THEN 0 ELSE d.count3 END) disposal from(
select disp.sen,disp.pres_judge, sum(CASE WHEN disp.j_len = 1 THEN disp.count ELSE 0 END) AS single, sum(CASE WHEN disp.j_len = 2 THEN disp.count ELSE 0 END)

AS divn, sum(CASE WHEN disp.j_len > 2 THEN disp.count ELSE 0 END) AS larger from (select (substring(cd.judge_code,0,3)::text) pres_judge,cd.judge_code,

array_length(string_to_array(cd.judge_code,','),1) j_len, jm.seniority as sen,count(cd.judge_code) from case_disposal cd left join judge_master jm on

substring(cd.judge_code,0,3)::text=jm.judge_code::text where cd.judge_code is not null and cd.judge_code !='' and disposal_date between '2018-03-01' and

'2018-03-12' group by sen,pres_judge,cd.judge_code order by sen, j_len desc ) disp group by disp.sen,disp.pres_judge order by disp.sen,disp.pres_judge) a
left join
(
select absdisp.pres_judge1,sum(absdisp.single+divn1st) count1 from

(select disp.sen,disp.pres_judge1,disp.pres_judge2,disp.pres_judge3, sum(CASE WHEN disp.j_len = 1 THEN disp.count ELSE 0 END) AS single, sum(CASE WHEN

disp.j_len = 2 THEN disp.count ELSE 0 END) AS divn1st,sum(CASE WHEN disp.pres_judge2 !='' THEN disp.count ELSE 0 END) AS divn2nd,sum(CASE WHEN

disp.pres_judge3 !='' THEN disp.count ELSE 0 END) AS divn3rd, sum(CASE WHEN disp.j_len > 2 THEN disp.count ELSE 0 END) AS larger from (select (substring

(cd.judge_code,0,3)::text) pres_judge1,(substring(cd.judge_code,4,3)::text) pres_judge2,(substring(cd.judge_code,8,3)::text) pres_judge3,cd.judge_code,

array_length(string_to_array(cd.judge_code,','),1) j_len, jm.seniority as sen,count(cd.judge_code) from case_disposal cd left join judge_master jm on

substring(cd.judge_code,0,3)::text=jm.judge_code::text where cd.judge_code is not null and cd.judge_code !='' and disposal_date between '2018-03-01' and

'2018-03-12' group by sen,pres_judge1,cd.judge_code order by sen, j_len desc )disp group by disp.sen,disp.pres_judge1,disp.pres_judge2,disp.pres_judge3 order

by disp.sen,disp.pres_judge1,disp.pres_judge2,disp.pres_judge3) absdisp group by absdisp.pres_judge1 ) b on a.pres_judge=b.pres_judge1

left join

(
select absdisp.pres_judge2,sum(divn2nd) count2 from

(select disp.sen,disp.pres_judge1,disp.pres_judge2,disp.pres_judge3, sum(CASE WHEN disp.j_len = 1 THEN disp.count ELSE 0 END) AS single, sum(CASE WHEN

disp.j_len = 2 THEN disp.count ELSE 0 END) AS divn1st,sum(CASE WHEN disp.pres_judge2 !='' THEN disp.count ELSE 0 END) AS divn2nd,sum(CASE WHEN

disp.pres_judge3 !='' THEN disp.count ELSE 0 END) AS divn3rd, sum(CASE WHEN disp.j_len > 2 THEN disp.count ELSE 0 END) AS larger from (select (substring

(cd.judge_code,0,3)::text) pres_judge1,(substring(cd.judge_code,4,3)::text) pres_judge2,(substring(cd.judge_code,8,3)::text) pres_judge3,cd.judge_code,

array_length(string_to_array(cd.judge_code,','),1) j_len, jm.seniority as sen,count(cd.judge_code) from case_disposal cd left join judge_master jm on

substring(cd.judge_code,0,3)::text=jm.judge_code::text where cd.judge_code is not null and cd.judge_code !='' and disposal_date between '2018-03-01' and

'2018-03-12' group by sen,pres_judge1,cd.judge_code order by sen, j_len desc )disp group by disp.sen,disp.pres_judge1,disp.pres_judge2,disp.pres_judge3 order

by disp.sen,disp.pres_judge1,disp.pres_judge2,disp.pres_judge3) absdisp where absdisp.pres_judge2!='' group by absdisp.pres_judge2 ) c on

a.pres_judge=c.pres_judge2

left join
(
select absdisp.pres_judge3,sum(divn3rd) count3 from

(select disp.sen,disp.pres_judge1,disp.pres_judge2,disp.pres_judge3, sum(CASE WHEN disp.j_len = 1 THEN disp.count ELSE 0 END) AS single, sum(CASE WHEN

disp.j_len = 2 THEN disp.count ELSE 0 END) AS divn1st,sum(CASE WHEN disp.pres_judge2 !='' THEN disp.count ELSE 0 END) AS divn2nd,sum(CASE WHEN

disp.pres_judge3 !='' THEN disp.count ELSE 0 END) AS divn3rd, sum(CASE WHEN disp.j_len > 2 THEN disp.count ELSE 0 END) AS larger from (select (substring

(cd.judge_code,0,3)::text) pres_judge1,(substring(cd.judge_code,4,3)::text) pres_judge2,(substring(cd.judge_code,8,3)::text) pres_judge3,cd.judge_code,

array_length(string_to_array(cd.judge_code,','),1) j_len, jm.seniority as sen,count(cd.judge_code) from case_disposal cd left join judge_master jm on

substring(cd.judge_code,0,3)::text=jm.judge_code::text where cd.judge_code is not null and cd.judge_code !='' and disposal_date between '2018-03-01' and

'2018-03-12' group by sen,pres_judge1,cd.judge_code order by sen, j_len desc )disp group by disp.sen,disp.pres_judge1,disp.pres_judge2,disp.pres_judge3 order

by disp.sen,disp.pres_judge1,disp.pres_judge2,disp.pres_judge3) absdisp where absdisp.pres_judge3!='' group by absdisp.pres_judge3
) d on a.pres_judge=d.pres_judge3 group by a.sen,a.pres_judge



     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.