java中的sql语句用mongodb写
mongodb吧
全部回复
仅看楼主
level 1
庾书雁0fK 楼主
select a.*,b.ws_name,c.wry_name,c.wry_id,ar.AREA_NAME from ws_wry c left join WS_AREA ar on ar.AREA_ID=c.AREA_ID inner join ws_jcd b on c.wry_id=b.wry_id left join (select datatime,txbz ,max(case JCYZ_BM when 'tsp' then avalue end ) as atsp,max(case JCYZ_BM when 'pm10' then avalue end ) as apm10,max(case JCYZ_BM when 'pm25' then avalue end ) as apm25,max(case JCYZ_BM when 'noise' then avalue end ) as anoise,max(case JCYZ_BM when 'windDire' then avalue end ) as awindDire,max(case JCYZ_BM when 'temperature' then avalue end ) as atemperature,max(case JCYZ_BM when 'humidity' then avalue end ) as ahumidity,max(case JCYZ_BM when 'airPress' then avalue end ) as aairPress from pub_currenttemp group by datatime,txbz) a on b.ws_txbz=a.txbz where b.ws_txbz in ('799835211','800037896','804598851','JZYC0000000023','JZYC0000000009') order by ar.AREA_ID
2015年10月22日 02点10分 1
level 1
庾书雁0fK 楼主
刚刚学mongodb,求大神帮帮忙
2015年10月22日 02点10分 2
1