SELECT * from lines, coords WHERE x_pos >= start_x AND x_pos <= end_x