Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Okay, literally :
CREATE TABLE Point ( P CHAR(2), X INT, Y INT);
INSERT Point VALUES ( 'A1', 3, 4 ), ( 'A2', 8, 7 );
SELECT CONCAT( PA1.P, PA2.P ), PA2.X - PA1.X, PA2.Y - PA1.Y
FROM Point AS PA1, Point AS PA2
WHERE PA1.P = 'A1' AND PA2.P = 'A2'
Как это организовать в одном SQL запросе?Никак без указания СУБД.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question