| | |
| | | cs1.yuz as Z, |
| | | cs1.yjsw, |
| | | cs1.stname, |
| | | cs1.qzsw as minz, |
| | | ad.ADDVNM as addvnm, |
| | | cs1.river, |
| | | st.LGTD, |
| | | st.LTTD |
| | | st.LTTD, |
| | | st.HNNM |
| | | FROM ( |
| | | SELECT A.stcd, |
| | | MAX(A.ftime) as ftime |
| | | FROM (SELECT stcd, ftime FROM sys_Yucsma) AS A |
| | | GROUP BY A.stcd |
| | | ) cs |
| | | INNER JOIN (SELECT stcd, stname, ftime, ytime, yuz, yjsw, river FROM sys_Yucsma) cs1 |
| | | INNER JOIN (SELECT stcd, stname, ftime, ytime, yuz, yjsw, river,qzsw FROM sys_Yucsma) cs1 |
| | | ON cs.stcd = cs1.stcd and cs.ftime = cs1.ftime |
| | | INNER JOIN (SELECT LGTD, LTTD, STCD, ADDVCD FROM ST_STBPRP_B) st ON st.STCD = cs1.stcd |
| | | INNER JOIN dbo.ST_ADDVCD_D ad ON ad.ADDVCD = st.ADDVCD |