가 나는 SQL 코드가 붙어 표 1에서 계산 수 (나는 충분 그것을 설명 할 수 있기를 바랍니다) :SQL 내가 데이터를 얻을 TE 필요가 복잡
Table 1 is filled with traffic accidents(VKL_NUMBER and TIME)
Table 2 is filled with the locations of the accidents and the closest weather station (VKL_NUMBER, LOCATION and STN_NUMBER)
Table 3 is filled with weather data and the weather station where it came from(STN_NUMBER, TIME, WEATHER_TYPE)
: 내 데이터베이스에있는 세 개의 테이블이 있습니다
비가 올 곳의 사고를 계산해야합니다. 테이블에 키는 다음과 같습니다
From 1 to 2: VKL_NUMBER(accident number)
From 2 to 3: STN_NUMBER (weather station number)
어떻게 카운트 처럼의 사고에 가장 가까운 시간에 weathertype을 얻을 수 있습니다
Count accidents where it rains at the closest weatherstation.
대한 추가 정보를 원하시면 :
The accidents table has VKL_NUMBER(FK to the locations table) TIME(HHMM format) and DATE(YYMMDD format)
The locations table has VKL_NUMBER(FK to accidents), LOCATION(not important for this question) and STN_NUMBER(FK to the weather table)
The weather table had STN_NUMBER(FK to locations table), WEATHERTYPE("rain","snow","hail"), TIME(HHMM format) and DATE(YYMMDD format)
"비가 오는 곳"이라고하면이 정보를 제공하는 열을 구체적으로 말할 수 있습니까? 다른 필드와 동일합니다. – Adi
사고 테이블의 VKL_NUMBER (위치 테이블에 FK) TIME (HHMM 형식) 및 DATE (YYMMDD 형식) 위치 테이블의 VKL_NUMBER (사고에 FK), LOCATION (이 질문에 중요하지 않음) 및 STN_NUMBER 날씨 테이블) 날씨 테이블에 STN_NUMBER (FK to locations 테이블), WEATHERTYPE ("rain", "snow", "우박"), TIME (HHMM 형식) 및 DATE (YYMMDD 형식) –
테이블 1과 테이블 2가 분리되는 이유는 무엇입니까? ? – Strawberry