'SELECT '#24207#21495','#21697#21517','#25968#37327',Max('#20986#24211#26085#26399') as '#26368#36817#21457#25918',(case when julianday('#20986#24211#26085#26399') + '#25968 +
#37327'/if('#21697#21517'='#39#37202#31934#28040#27602#28082#39' or '#21697#21517'='#39#19968#27425#24615#21475#32617#39' ,(select count(*) from '#20154#21592#34920' where ' +
#25152#22312#37096#38376#65288#29677#32452#65289'= '#20986#24211#34920'.'#25152#22312#37096#38376#65288#29677#32452#65289'),1)*'#20351#29992#21608#26399#65288#22825#65289' <= julianday('#39'now'#39') then '#39#24050#21040#26399 +
#39' else '#39#26410#21040#26399#39' end ) as '#21040#26399#25552#31034','#39046#21462#20154','#25152#22312#37096#38376#65288#29677#32452#65289',(select count(*) from '#20154#21592 +
#34920' where '#25152#22312#37096#38376#65288#29677#32452#65289'= '#20986#24211#34920'.'#25152#22312#37096#38376#65288#29677#32452#65289') as '#20154#25968','#20351#29992#21608#26399#65288#22825#65289' FROM '#20986#24211#34920' GROUP BY ' +
#25152#22312#37096#38376#65288#29677#32452#65289','#21697#21517' order by '#25152#22312#37096#38376#65288#29677#32452#65289','#21697#21517)
#37327'/if('#21697#21517'='#39#19968#27425#24615#21475#32617#39' ,(select count(*) from '#20154#21592#34920' where '#25152#22312#37096#38376#65288#29677#32452#65289'= '#20986#24211#34920'.'#25152 +
#22312#37096#38376#65288#29677#32452#65289'),1)*'#20351#29992#21608#26399#65288#22825#65289' <= julianday('#39'now'#39') then '#39#24050#21040#26399#39' else '#39#26410#21040#26399#39' en' +
'd ) as '#21040#26399#25552#31034','#39046#21462#20154','#25152#22312#37096#38376#65288#29677#32452#65289',(select count(*) from '#20154#21592#34920' where '#25152#22312#37096#38376#65288#29677#32452 +
#65289'= '#20986#24211#34920'.'#25152#22312#37096#38376#65288#29677#32452#65289') as '#20154#25968','#20351#29992#21608#26399#65288#22825#65289' FROM '#20986#24211#34920' GROUP BY '#25152#22312#37096#38376#65288#29677#32452#65289','#21697#21517' ord' +
'er by '#25152#22312#37096#38376#65288#29677#32452#65289','#21697#21517)