伐清 正文 第三十一节 呆仗(上)# paladin - 谈古论金,黄梁一梦
H*M
1 楼
write in ANSI SQL only.
you are given two tables:
Table A:
IDA(int) x(double) y(double) correlatedIDB(int)
1 1.0 2.0
2 2.1 3.3
Table B:
IDB(int) x(double) y(double)
1 1.1 2.1
2 2 3
3 10 15
find the cloest ID in table B for each row in A and update the value in Tabl
e A.
by closest, it means min(sqr(A.x-B.x) + sqr(A.y-B.y)).
Therefore,
The correlatedIDB of the first row in Table A should be 1
The co
you are given two tables:
Table A:
IDA(int) x(double) y(double) correlatedIDB(int)
1 1.0 2.0
2 2.1 3.3
Table B:
IDB(int) x(double) y(double)
1 1.1 2.1
2 2 3
3 10 15
find the cloest ID in table B for each row in A and update the value in Tabl
e A.
by closest, it means min(sqr(A.x-B.x) + sqr(A.y-B.y)).
Therefore,
The correlatedIDB of the first row in Table A should be 1
The co