Using the bind variables :start1 and :end1 as the bounds for the first range and :start2 and :end2 as the bounds for the second range:

SELECT d1.data AS data1,
d1.code AS code1,
d2.data AS data2,
d2.code AS code2
FROM (
SELECT data,
code,
ROW_NUMBER() OVER ( ORDER BY data ) AS rn
FROM people
WHERE data BETWEEN :start1 AND :end1
) d1
FULL OUTER JOIN
(
SELECT data,
code,
ROW_NUMBER() OVER ( ORDER BY data ) AS rn
FROM people
WHERE data BETWEEN :start2 AND :end2
) d2
ON ( d1.rn = d2.rn )