यह ऐसा करेगा, उच्च id_image
. के साथ पहले स्लॉट में दिखाई दे रहा है:
INSERT INTO new_table
SELECT t1.id_image, t1.score, t1.stddev, t2.id_image,
t2.score, t2.stddev, t1.id_location
FROM old_table t1
JOIN old_table t2
ON t2.id_location = t1.id_location
AND t2.id_image < t1.id_image