ソースコード
select  d2.DISTRICT_CODE as CODE
        ,d2.DISTRICT_NAME as NAME
        ,L2.LATITUDE as LAT
        ,L2.LONGITUDE as LON
  from  DISTRICT d2,LOCATION_TBL L2,
(
select  d.DISTRICT_CODE as CODE
        ,min(
             power( power(cast(L.LATITUDE as real)  - cast(p.LATITUDE as real),2)
                  +power(cast(L.LONGITUDE as real) - cast(p.LONGITUDE as real),2) ,0.5 )
        ) as dis
  from  DISTRICT d,LOCATION_TBL L,
  (select LATITUDE,LONGITUDE from LOCATION_TBL where DISTRICT_CODE = '1101') p
 where  d.DISTRICT_CODE <> '1101'
    and d.DISTRICT_CODE = L.DISTRICT_CODE
group by d.DISTRICT_CODE
) dd
 where  L2.DISTRICT_CODE = dd.CODE
   and  d2.DISTRICT_CODE = L2.DISTRICT_CODE
 order by dd.dis,L2.DISTRICT_CODE
/*
select  d.DISTRICT_CODE as CODE
        ,d.DISTRICT_NAME as NAME
        ,L.LATITUDE as LAT
        ,L.LONGITUDE as LON
  from  DISTRICT d,LOCATION_TBL L,
*/
提出情報
提出日時2023/04/14 20:42:14
コンテスト第6回 SQLコンテスト
問題位置情報
受験者ksw_201815
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量94 MB
メッセージ
テストケース(通過数/総数)
0/3
状態
メモリ使用量
データパターン1
WA
88 MB
データパターン2
WA
94 MB
データパターン3
WA
89 MB